Skip to content

Rollup of 14 pull requests #122973

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

Closed
wants to merge 46 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
d561a84
Update tests
veera-sivarajan Mar 3, 2024
9aac0c9
Mention Register Size in `#[warn(asm_sub_register)]`
veera-sivarajan Mar 3, 2024
d3299af
transmute: caution against int2ptr transmutation
RalfJung Mar 12, 2024
1bde828
Improve style
veera-sivarajan Mar 13, 2024
982918f
Handle str literals written with `'` lexed as lifetime
estebank Mar 9, 2024
4a10b01
Use shorter span for existing `'` -> `"` structured suggestion
estebank Mar 9, 2024
999a0dc
review comment: `str` -> string in messages
estebank Mar 13, 2024
6f388ef
Extend test to trigger on 2015, 2018 and 2021 editions
estebank Mar 14, 2024
ea1883d
Silence redundant error on char literal that was meant to be a string…
estebank Mar 14, 2024
f4d30b1
fix rustdoc test
estebank Mar 17, 2024
f4adb1e
add notes on how to store 'ptr or int'
RalfJung Mar 14, 2024
2758435
Fix compile of wasm64-unknown-unknown target
alexcrichton Mar 20, 2024
afc99cc
Update test for `aarch64`
veera-sivarajan Mar 20, 2024
1fcf2ea
Uniquify ReError on input mode in canonicalizer
compiler-errors Mar 22, 2024
dec36c3
CFI: Support self_cell-like recursion
maurer Mar 3, 2024
12e3629
add test for #99945
matthiaskrgr Mar 23, 2024
2f9a240
add test for opaque type with non-universal region substs #101852
matthiaskrgr Mar 23, 2024
e54bff7
add test for #104779 opaque types, patterns and subtyping ICE: Index…
matthiaskrgr Mar 23, 2024
f1f287f
add test for ICE "raw ptr comparison should already be caught in the…
matthiaskrgr Mar 23, 2024
f8aeac8
add test for #106423
matthiaskrgr Mar 23, 2024
cc422ce
add test for ICE #106444
matthiaskrgr Mar 23, 2024
f2bc9c5
add test for #106874 ICE BoundUniversalRegionError
matthiaskrgr Mar 23, 2024
368bfb2
add test for #107228
matthiaskrgr Mar 23, 2024
9aea37d
address review feedback
matthiaskrgr Mar 23, 2024
4e8753b
Rework rmake support library to have a weakly-typed API with helper m…
jieyouxu Mar 13, 2024
246f746
Add test in `higher-ranked`
Luv-Ray Mar 23, 2024
188c46a
regression test for #103626
kadiwa4 Feb 19, 2024
7967915
CFI: Use Instance at callsites
maurer Mar 15, 2024
f434c27
CFI: Strip auto traits off Self for virtual calls
maurer Mar 15, 2024
b6b5745
In `pretty_print_type()`, print `async fn` futures' paths instead of …
kpreid Mar 23, 2024
e74b01e
core/panicking: fix outdated comment
RalfJung Mar 23, 2024
66f1e14
Simplify an iterator search in borrowck diag
cuviper Mar 24, 2024
4a85fda
Rollup merge of #121281 - kadiwa4:test_103626, r=estebank,lcnr
workingjubilee Mar 24, 2024
5277cfd
Rollup merge of #121940 - veera-sivarajan:bugfix-121593, r=fmease
workingjubilee Mar 24, 2024
0e1a3de
Rollup merge of #122217 - estebank:issue-119685, r=fmease
workingjubilee Mar 24, 2024
22cc9b6
Rollup merge of #122379 - RalfJung:int2ptr-transmute, r=m-ou-se
workingjubilee Mar 24, 2024
55b4492
Rollup merge of #122460 - jieyouxu:rmake-example-refactor, r=Nilstrieb
workingjubilee Mar 24, 2024
cddf288
Rollup merge of #122797 - alexcrichton:fix-compile-wasm64, r=Mark-Sim…
workingjubilee Mar 24, 2024
7813623
Rollup merge of #122875 - maurer:cfi-transparent-termination, r=worki…
workingjubilee Mar 24, 2024
717b29d
Rollup merge of #122879 - maurer:callsite-instances, r=workingjubilee
workingjubilee Mar 24, 2024
132050a
Rollup merge of #122907 - compiler-errors:uniquify-reerror, r=lcnr
workingjubilee Mar 24, 2024
d011118
Rollup merge of #122923 - kpreid:print-async-def, r=compiler-errors
workingjubilee Mar 24, 2024
8ef4e6d
Rollup merge of #122942 - Luv-Ray:master, r=lcnr
workingjubilee Mar 24, 2024
bd19f30
Rollup merge of #122943 - matthiaskrgr:ice-tests-9xxxx-to-12xxxx, r=f…
workingjubilee Mar 24, 2024
685baef
Rollup merge of #122963 - RalfJung:core-panicking, r=m-ou-se
workingjubilee Mar 24, 2024
8f00f4b
Rollup merge of #122969 - cuviper:borrowck-rposition, r=matthewjasper
workingjubilee Mar 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add test for #104779 opaque types, patterns and subtyping ICE: IndexM…
…ap: key not found

Fixes #104779
  • Loading branch information
matthiaskrgr committed Mar 23, 2024
commit e54bff71091e7c3a16c96e2f79328eb73815d7cd
26 changes: 26 additions & 0 deletions tests/ui/borrowck/opaque-types-patterns-subtyping-ice-104779.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// issue: rust-lang/rust#104779
// ICE region infer, IndexMap: key not found

struct Inv<'a>(&'a mut &'a ());
enum Foo<T> {
Bar,
Var(T),
}
type Subtype = Foo<for<'a, 'b> fn(Inv<'a>, Inv<'b>)>;
type Supertype = Foo<for<'a> fn(Inv<'a>, Inv<'a>)>;

fn foo() -> impl Sized {
//~^ WARN function cannot return without recursing
loop {
match foo() {
//~^ ERROR higher-ranked subtype error
//~^^ ERROR higher-ranked subtype error
Subtype::Bar => (),
//~^ ERROR higher-ranked subtype error
//~^^ ERROR higher-ranked subtype error
Supertype::Var(x) => {}
}
}
}

pub fn main() {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
warning: function cannot return without recursing
--> $DIR/opaque-types-patterns-subtyping-ice-104779.rs:12:1
|
LL | fn foo() -> impl Sized {
| ^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing
...
LL | match foo() {
| ----- recursive call site
|
= help: a `loop` may express intention better if this is on purpose
= note: `#[warn(unconditional_recursion)]` on by default

error: higher-ranked subtype error
--> $DIR/opaque-types-patterns-subtyping-ice-104779.rs:15:15
|
LL | match foo() {
| ^^^^^

error: higher-ranked subtype error
--> $DIR/opaque-types-patterns-subtyping-ice-104779.rs:15:15
|
LL | match foo() {
| ^^^^^
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`

error: higher-ranked subtype error
--> $DIR/opaque-types-patterns-subtyping-ice-104779.rs:18:13
|
LL | Subtype::Bar => (),
| ^^^^^^^^^^^^

error: higher-ranked subtype error
--> $DIR/opaque-types-patterns-subtyping-ice-104779.rs:18:13
|
LL | Subtype::Bar => (),
| ^^^^^^^^^^^^
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`

error: aborting due to 4 previous errors; 1 warning emitted