-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rollup of 14 pull requests #122973
Rollup of 14 pull requests #122973
Commits on Mar 3, 2024
-
Configuration menu - View commit details
-
Copy full SHA for d561a84 - Browse repository at this point
Copy the full SHA d561a84View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9aac0c9 - Browse repository at this point
Copy the full SHA 9aac0c9View commit details
Commits on Mar 12, 2024
-
Configuration menu - View commit details
-
Copy full SHA for d3299af - Browse repository at this point
Copy the full SHA d3299afView commit details
Commits on Mar 13, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 1bde828 - Browse repository at this point
Copy the full SHA 1bde828View commit details
Commits on Mar 17, 2024
-
Handle str literals written with
'
lexed as lifetimeGiven `'hello world'` and `'1 str', provide a structured suggestion for a valid string literal: ``` error[E0762]: unterminated character literal --> $DIR/lex-bad-str-literal-as-char-3.rs:2:26 | LL | println!('hello world'); | ^^^^ | help: if you meant to write a `str` literal, use double quotes | LL | println!("hello world"); | ~ ~ ``` ``` error[E0762]: unterminated character literal --> $DIR/lex-bad-str-literal-as-char-1.rs:2:20 | LL | println!('1 + 1'); | ^^^^ | help: if you meant to write a `str` literal, use double quotes | LL | println!("1 + 1"); | ~ ~ ``` Fix rust-lang#119685.
Configuration menu - View commit details
-
Copy full SHA for 982918f - Browse repository at this point
Copy the full SHA 982918fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4a10b01 - Browse repository at this point
Copy the full SHA 4a10b01View commit details -
Configuration menu - View commit details
-
Copy full SHA for 999a0dc - Browse repository at this point
Copy the full SHA 999a0dcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6f388ef - Browse repository at this point
Copy the full SHA 6f388efView commit details -
Silence redundant error on char literal that was meant to be a string…
… in 2021 edition
Configuration menu - View commit details
-
Copy full SHA for ea1883d - Browse repository at this point
Copy the full SHA ea1883dView commit details -
Configuration menu - View commit details
-
Copy full SHA for f4d30b1 - Browse repository at this point
Copy the full SHA f4d30b1View commit details
Commits on Mar 19, 2024
-
Configuration menu - View commit details
-
Copy full SHA for f4adb1e - Browse repository at this point
Copy the full SHA f4adb1eView commit details
Commits on Mar 20, 2024
-
Fix compile of wasm64-unknown-unknown target
This target is a Tier 3 target so it's not tested on CI, and it's broken since last used so this commit fixes a small unwind-related issue that cropped up in the meantime.
Configuration menu - View commit details
-
Copy full SHA for 2758435 - Browse repository at this point
Copy the full SHA 2758435View commit details -
Configuration menu - View commit details
-
Copy full SHA for afc99cc - Browse repository at this point
Copy the full SHA afc99ccView commit details
Commits on Mar 22, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 1fcf2ea - Browse repository at this point
Copy the full SHA 1fcf2eaView commit details -
CFI: Support self_cell-like recursion
Current `transform_ty` attempts to avoid cycles when normalizing `#[repr(transparent)]` types to their interior, but runs afoul of this pattern used in `self_cell`: ``` struct X<T> { x: u8, p: PhantomData<T>, } #[repr(transparent)] struct Y(X<Y>); ``` When attempting to normalize Y, it will still cycle indefinitely. By using a types-visited list, this will instead get expanded exactly one layer deep to X<Y>, and then stop, not attempting to normalize `Y` any further.
Configuration menu - View commit details
-
Copy full SHA for dec36c3 - Browse repository at this point
Copy the full SHA dec36c3View commit details
Commits on Mar 23, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 12e3629 - Browse repository at this point
Copy the full SHA 12e3629View commit details -
add test for opaque type with non-universal region substs rust-lang#1…
…01852 Fixes rust-lang#101852
Configuration menu - View commit details
-
Copy full SHA for 2f9a240 - Browse repository at this point
Copy the full SHA 2f9a240View commit details -
add test for rust-lang#104779 opaque types, patterns and subtyping IC…
…E: IndexMap: key not found Fixes rust-lang#104779
Configuration menu - View commit details
-
Copy full SHA for e54bff7 - Browse repository at this point
Copy the full SHA e54bff7View commit details -
add test for ICE "raw ptr comparison should already be caught in the …
…trait system" rust-lang#105047 Fixes rust-lang#105047
Configuration menu - View commit details
-
Copy full SHA for f1f287f - Browse repository at this point
Copy the full SHA f1f287fView commit details -
Configuration menu - View commit details
-
Copy full SHA for f8aeac8 - Browse repository at this point
Copy the full SHA f8aeac8View commit details -
Configuration menu - View commit details
-
Copy full SHA for cc422ce - Browse repository at this point
Copy the full SHA cc422ceView commit details -
Configuration menu - View commit details
-
Copy full SHA for f2bc9c5 - Browse repository at this point
Copy the full SHA f2bc9c5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 368bfb2 - Browse repository at this point
Copy the full SHA 368bfb2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9aea37d - Browse repository at this point
Copy the full SHA 9aea37dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4e8753b - Browse repository at this point
Copy the full SHA 4e8753bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 246f746 - Browse repository at this point
Copy the full SHA 246f746View commit details -
Configuration menu - View commit details
-
Copy full SHA for 188c46a - Browse repository at this point
Copy the full SHA 188c46aView commit details -
CFI: Use Instance at callsites
We already use `Instance` at declaration sites when available to glean additional information about possible abstractions of the type in use. This does the same when possible at callsites as well. The primary purpose of this change is to allow CFI to alter how it generates type information for indirect calls through `Virtual` instances.
Configuration menu - View commit details
-
Copy full SHA for 7967915 - Browse repository at this point
Copy the full SHA 7967915View commit details -
CFI: Strip auto traits off Self for virtual calls
Additional trait bounds beyond the principal trait and its implications are not possible in the vtable. This means that if a receiver is `&dyn Foo + Send`, the function will only be expecting `&dyn Foo`. This strips those auto traits off before CFI encoding.
Configuration menu - View commit details
-
Copy full SHA for f434c27 - Browse repository at this point
Copy the full SHA f434c27View commit details -
In
pretty_print_type()
, printasync fn
futures' paths instead of ……spans. This makes `-Zprint-type-sizes`'s output easier to read, because the name of an `async fn` is more immediately recognizable than its span. I also deleted the comment "FIXME(eddyb) should use `def_span`." because it appears to have already been fixed by commit 67727aa.
Configuration menu - View commit details
-
Copy full SHA for b6b5745 - Browse repository at this point
Copy the full SHA b6b5745View commit details -
Configuration menu - View commit details
-
Copy full SHA for e74b01e - Browse repository at this point
Copy the full SHA e74b01eView commit details
Commits on Mar 24, 2024
-
Simplify an iterator search in borrowck diag
Rather than `.into_iter().rev().find_position(...)`, this case can simply call `.iter().rposition(...)`.
Configuration menu - View commit details
-
Copy full SHA for 66f1e14 - Browse repository at this point
Copy the full SHA 66f1e14View commit details -
Rollup merge of rust-lang#121281 - kadiwa4:test_103626, r=estebank,lcnr
regression test for rust-lang#103626 I don't know what a descriptive filename for this would be. Fixes rust-lang#103626
Configuration menu - View commit details
-
Copy full SHA for 4a85fda - Browse repository at this point
Copy the full SHA 4a85fdaView commit details -
Rollup merge of rust-lang#121940 - veera-sivarajan:bugfix-121593, r=f…
…mease Mention Register Size in `#[warn(asm_sub_register)]` Fixes rust-lang#121593 Displays the register size information obtained from `suggest_modifier()` and `default_modifier()`.
Configuration menu - View commit details
-
Copy full SHA for 5277cfd - Browse repository at this point
Copy the full SHA 5277cfdView commit details -
Rollup merge of rust-lang#122217 - estebank:issue-119685, r=fmease
Handle str literals written with `'` lexed as lifetime Given `'hello world'` and `'1 str', provide a structured suggestion for a valid string literal: ``` error[E0762]: unterminated character literal --> $DIR/lex-bad-str-literal-as-char-3.rs:2:26 | LL | println!('hello world'); | ^^^^ | help: if you meant to write a `str` literal, use double quotes | LL | println!("hello world"); | ~ ~ ``` ``` error[E0762]: unterminated character literal --> $DIR/lex-bad-str-literal-as-char-1.rs:2:20 | LL | println!('1 + 1'); | ^^^^ | help: if you meant to write a `str` literal, use double quotes | LL | println!("1 + 1"); | ~ ~ ``` Fix rust-lang#119685.
Configuration menu - View commit details
-
Copy full SHA for 0e1a3de - Browse repository at this point
Copy the full SHA 0e1a3deView commit details -
Rollup merge of rust-lang#122379 - RalfJung:int2ptr-transmute, r=m-ou-se
transmute: caution against int2ptr transmutation This came up in rust-lang#121282. Cc `````@saethlin````` `````@scottmcm````` Eventually we'll add a proper description of provenance that we can reference, but that's a bunch of work and it's unclear who will have the time to do that when. Meanwhile, let's at least do what we can without mentioning provenance explicitly.
Configuration menu - View commit details
-
Copy full SHA for 22cc9b6 - Browse repository at this point
Copy the full SHA 22cc9b6View commit details -
Rollup merge of rust-lang#122460 - jieyouxu:rmake-example-refactor, r…
…=Nilstrieb Rework rmake support library API ### Take 1: Strongly-typed API Context: rust-lang#122448 (comment) > My 2 cents: from my experience with writing similar "test DSLs", I would suggest to create these helpers as soon as possible in the process (basically the first time someone needs them, not only after N similar usages), and basically treat any imperative code in these high-level tests as a maintenance burden, basically making them as declarative as possible. Otherwise it might be a bit annoying to keep refactoring the tests later once such helpers are available. > > I would even discourage the arg method and create explicit methods for setting things like unpretty, the output file etc., but this might be more controversial, as it will make the invoked command-line arguments more opaque. cc ``@Kobzol`` for the testing DSL suggestion. Example: ```rs let output = Rustc::new() .input_file("main.rs") .emit(&[EmitKind::Metadata]) .extern_("stable", &stable_path) .output(); ``` ### Take 2: xshell-based macro API Example: ```rs let sh = Shell::new()?; let stable_path = stable_path.to_string_lossy(); let output = cmd!(sh, "rustc main.rs --emit=metadata --extern stable={stable_path}").output()?; ``` ### Take 3: Weakly-typed API with a few helper methods ```rs let output = Rustc::new() .input("main.rs") .emit("metadata") .extern_("stable", &stable_path) .output(); ```
Configuration menu - View commit details
-
Copy full SHA for 55b4492 - Browse repository at this point
Copy the full SHA 55b4492View commit details -
Rollup merge of rust-lang#122797 - alexcrichton:fix-compile-wasm64, r…
…=Mark-Simulacrum Fix compile of wasm64-unknown-unknown target This target is a Tier 3 target so it's not tested on CI, and it's broken since last used so this commit fixes a small unwind-related issue that cropped up in the meantime.
Configuration menu - View commit details
-
Copy full SHA for cddf288 - Browse repository at this point
Copy the full SHA cddf288View commit details -
Rollup merge of rust-lang#122875 - maurer:cfi-transparent-termination…
…, r=workingjubilee CFI: Support self_cell-like recursion Current `transform_ty` attempts to avoid cycles when normalizing `#[repr(transparent)]` types to their interior, but runs afoul of this pattern used in `self_cell`: ``` struct X<T> { x: u8, p: PhantomData<T>, } #[repr(transparent)] struct Y(X<Y>); ``` When attempting to normalize Y, it will still cycle indefinitely. By using a types-visited list, this will instead get expanded exactly one layer deep to X<Y>, and then stop, not attempting to normalize `Y` any further. This PR was split off from rust-lang#121962 as part of fixing the larger vtable compatibility issues. r? ````@workingjubilee````
Configuration menu - View commit details
-
Copy full SHA for 7813623 - Browse repository at this point
Copy the full SHA 7813623View commit details -
Rollup merge of rust-lang#122879 - maurer:callsite-instances, r=worki…
…ngjubilee CFI: Strip auto traits off Virtual calls We already use `Instance` at declaration sites when available to glean additional information about possible abstractions of the type in use. This does the same when possible at callsites as well. The primary purpose of this change is to allow CFI to alter how it generates type information for indirect calls through `Virtual` instances. This is needed for the "separate machinery" version of my approach to the vtable issues (rust-lang#122573), because we need to respond differently to a `Virtual` call to the same type as a non-virtual call, specifically [stripping auto traits off the receiver's `Self`](rust-lang@54b15b0) because there isn't a separate vtable for `Foo` vs `Foo + Send`. This would also make a more general underlying mechanism that could be used by rcvalle's [proposed drop detection / encoding](rust-lang@edcd1e2) if we end up using his approach, as we could condition out on the `def_id` in the CFI code rather than requiring the generating code to explicitly note whether it was calling drop.
Configuration menu - View commit details
-
Copy full SHA for 717b29d - Browse repository at this point
Copy the full SHA 717b29dView commit details -
Rollup merge of rust-lang#122907 - compiler-errors:uniquify-reerror, …
…r=lcnr Uniquify `ReError` on input mode in canonicalizer See test descr Fixes rust-lang#122861 r? lcnr
Configuration menu - View commit details
-
Copy full SHA for 132050a - Browse repository at this point
Copy the full SHA 132050aView commit details -
Rollup merge of rust-lang#122923 - kpreid:print-async-def, r=compiler…
…-errors In `pretty_print_type()`, print `async fn` futures' paths instead of spans. This makes `-Zprint-type-sizes`'s output easier to read, because the name of an `async fn` is more immediately recognizable than its span. This change will also synergize with my other `-Zprint-type-sizes` PR rust-lang#122922 which prints the type of child futures being awaited. I also deleted the comment "FIXME(eddyb) should use `def_span`." because it appears to have already been fixed by commit 67727aa.
Configuration menu - View commit details
-
Copy full SHA for d011118 - Browse repository at this point
Copy the full SHA d011118View commit details -
Rollup merge of rust-lang#122942 - Luv-Ray:master, r=lcnr
Add test in higher ranked subtype I'm a beginner in this repository, and there are some things I'm not sure about: - Is it okay that there is a warning: ``` rustc_infer::infer::relate::generalize may incompletely handle alias type: AliasTy { args: [?1t, '^0.Named(DefId(0:15 ~ structually_relate_aliases[de75]::{impl#1}::'a), "'a")], def_id: DefId(0:5 ~ structually_relate_aliases[de75]::ToUnit::Unit) } ``` - Is it okay that there are two duplicate errors in the same line? - Did I put the test in the right place? Any suggestions would be appreciated. Fixes rust-lang#121649
Configuration menu - View commit details
-
Copy full SHA for 8ef4e6d - Browse repository at this point
Copy the full SHA 8ef4e6dView commit details -
Rollup merge of rust-lang#122943 - matthiaskrgr:ice-tests-9xxxx-to-12…
…xxxx, r=fmease add a couple more ice tests Fixes rust-lang#104779 Fixes rust-lang#106423 Fixes rust-lang#106444 Fixes rust-lang#101852 Fixes rust-lang#106874 Fixes rust-lang#105047 Fixes rust-lang#107228 Fixes rust-lang#99945
Configuration menu - View commit details
-
Copy full SHA for bd19f30 - Browse repository at this point
Copy the full SHA bd19f30View commit details -
Rollup merge of rust-lang#122963 - RalfJung:core-panicking, r=m-ou-se
core/panicking: fix outdated comment Looks like this function got renamed/changed at some point and the comment did not get updated. r? ```@m-ou-se```
Configuration menu - View commit details
-
Copy full SHA for 685baef - Browse repository at this point
Copy the full SHA 685baefView commit details -
Rollup merge of rust-lang#122969 - cuviper:borrowck-rposition, r=matt…
…hewjasper Simplify an iterator search in borrowck diag Rather than `.into_iter().rev().find_position(...)`, this case can simply call `.iter().rposition(...)`.
Configuration menu - View commit details
-
Copy full SHA for 8f00f4b - Browse repository at this point
Copy the full SHA 8f00f4bView commit details