Skip to content

Instantly share code, notes, and snippets.

View Nadrieril's full-sized avatar

Guillaume Boisseau Nadrieril

View GitHub Profile
@Nadrieril
Nadrieril / arbitrary_self_types.rs
Created November 23, 2023 22:35
Test the method selection algorithm of `arbitrary_self_types`
#![feature(arbitrary_self_types)]
#![allow(dead_code)]
macro_rules! assert_priority {
(prefer method on $expected:ident given: $($rest:tt)*) => {
{
// Define one wrapper per entry, with any `foo` methods specified.
assert_priority!(@define_ptrs, $($rest)*);
// This is the `P<Q<...>>` type we want to play with.
type Combined = assert_priority!(@combined_type, $($rest)*);
@Nadrieril
Nadrieril / x.sh
Last active January 8, 2021 19:59
My `x.py` for rustc development
#!/usr/bin/env bash
# Wrapper around `x.py`. Assumes it's being run from the root of the rustc repo.
RUSTC_REPO="$(realpath "$PWD")"
RUSTC_PERF_REPO="$RUSTC_REPO/../rustc-perf"
X_PY="$RUSTC_REPO/x.py"
RUSTC="$RUSTC_REPO/build/x86_64-unknown-linux-gnu/stage1/bin/rustc"
RUSTFMT="$RUSTC_REPO/build/x86_64-unknown-linux-gnu/stage0/bin/rustfmt"
cd $RUSTC_REPO || exit
@Nadrieril
Nadrieril / shell.nix
Last active March 17, 2024 08:03
Building LineageOS on NixOS
# I used this shell.nix to build LineageOS 13.0 for my maguro (Samsung Galaxy Nexus GSM) phone
# The build instructions for normal Linuxes are here: https://wiki.lineageos.org/devices/maguro/build
# For NixOS, follow those instructions but skip anything related to installing packages
# Detailed instructions:
# cd into an empty directory of your choice
# copy this file there
# in nix-shell:
# $ repo init -u https://github.com/LineageOS/android.git -b cm-13.0
# $ repo sync
# $ source build/envsetup.sh