Skip to content

Instantly share code, notes, and snippets.

View davidtwco's full-sized avatar
🦀
Contributing to rustc

David Wood davidtwco

🦀
Contributing to rustc
View GitHub Profile
#![crate_type = "lib"]
#![feature(staged_api)]
#![stable(feature = "the_tortoise_and_the_unstable_function", since = "1.0.0")]
#[stable(feature = "the_tortoise_and_the_unstable_function", since = "1.0.0")]
pub struct Foo;
#[stable(feature = "the_tortoise_and_the_unstable_function", since = "1.0.0")]
pub struct Bar;
diff --git a/src/test/debuginfo/regression-macro-first-line.rs b/src/test/debuginfo/regression-macro-first-line.rs
index d79950c165b..8886e163ccc 100644
--- a/src/test/debuginfo/regression-macro-first-line.rs
+++ b/src/test/debuginfo/regression-macro-first-line.rs
@@ -38,7 +38,9 @@ macro_rules! inner {
}
fn main() {
+ let ret = 3;
outer!({
// ignore-lldb
// Regression test that functions which start with a macro invocation have line information which
// start from the first line.
// compile-flags:-g -Zdebug-macros
// === GDB TESTS ===================================================================================
// gdb-command:run
diff --git a/compiler/rustc_codegen_cranelift/src/driver/aot.rs b/compiler/rustc_codegen_cranelift/src/driver/aot.rs
index 05457ce15e9..8cdbbf4f8fe 100644
--- a/compiler/rustc_codegen_cranelift/src/driver/aot.rs
+++ b/compiler/rustc_codegen_cranelift/src/driver/aot.rs
@@ -66,7 +66,9 @@ fn emit_module(
let work_product = if backend_config.disable_incr_cache {
None
} else {
- rustc_incremental::copy_cgu_workproduct_to_incr_comp_cache_dir(tcx.sess, &name, &tmp_file)
+ rustc_incremental::copy_cgu_workproduct_to_incr_comp_cache_dir(
@davidtwco
davidtwco / rustc-polymorphize-shims-instancedef.patch
Last active August 17, 2020 15:11
unused_generic_params taking an InstanceDef, experimentation resulting from rust-lang/rust#75414.
diff --git a/src/librustc_metadata/rmeta/decoder/cstore_impl.rs b/src/librustc_metadata/rmeta/decoder/cstore_impl.rs
index 10b89cdd15a..5cc4185f3b7 100644
--- a/src/librustc_metadata/rmeta/decoder/cstore_impl.rs
+++ b/src/librustc_metadata/rmeta/decoder/cstore_impl.rs
@@ -84,6 +84,12 @@ impl IntoArgs for (CrateNum, DefId) {
}
}
+impl IntoArgs for ty::InstanceDef<'tcx> {
+ fn into_args(self) -> (DefId, DefId) {
@davidtwco
davidtwco / rustc-forced-symbol-clashing.patch
Last active August 14, 2020 22:43
Attempt to make reveal other issues resulting from root cause of rust-lang/rust#75255.
diff --git a/src/librustc_middle/ty/mod.rs b/src/librustc_middle/ty/mod.rs
index 6798addb8aa..8d8018982c9 100644
--- a/src/librustc_middle/ty/mod.rs
+++ b/src/librustc_middle/ty/mod.rs
@@ -645,7 +645,30 @@ impl<'a, 'tcx> HashStable<StableHashingContext<'a>> for TyS<'tcx> {
outer_exclusive_binder: _,
} = *self;
- kind.hash_stable(hcx, hasher);
+ match kind {
{ appimageTools, fetchurl, lib, gsettings-desktop-schemas, gtk3 }:
let
pname = "wootility";
version = "3.3.1";
in appimageTools.wrapType2 rec {
name = "${pname}-${version}";
src = fetchurl {
url = "https://s3.eu-west-2.amazonaws.com/wooting-update/wootility-linux-latest/wootility-${version}-x86_64.AppImage";
@davidtwco
davidtwco / deluge.docker.service
Last active May 14, 2021 08:39
Systemd units for running Deluge (w/ VPN), Jackett, SABnzbd, Sonarr, Radarr, Plex in Docker containers; superseded by https://github.com/davidtwco/veritas.
[Unit]
Description=Deluge
After=docker.service
Requires=docker.service
Requires=jackett.docker.service
[Service]
ExecStartPre=/usr/bin/docker pull linuxserver/deluge
ExecStart=/usr/bin/docker run --rm --name %n \
--network media \
@davidtwco
davidtwco / keybase.md
Created April 5, 2016 13:14
Keybase Proof

Keybase proof

I hereby claim:

  • I am davidtwco on github.
  • I am davidtwco (https://keybase.io/davidtwco) on keybase.
  • I have a public key ASCckMoyo0jl4XO6uV8-4iifQlnrQN9GDHRLquUZB3v_jgo

To claim this, I am signing this object: