Skip to content

Rollup of 8 pull requests #122959

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 32 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
d3299af
transmute: caution against int2ptr transmutation
RalfJung Mar 12, 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
2624e91
Soft-destabilize `RustcEncodable`/`RustcDecodable`
jhpratt Sep 21, 2023
fbf21c5
Remove RustcEncodable/Decodable from 2024 prelude
jhpratt Sep 21, 2023
1fcf2ea
Uniquify ReError on input mode in canonicalizer
compiler-errors Mar 22, 2024
da8a39a
Failing test
compiler-errors Mar 8, 2024
78ebb93
Fix validation on substituted callee bodies in MIR inliner
compiler-errors Mar 19, 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
246f746
Add test in `higher-ranked`
Luv-Ray Mar 23, 2024
188c46a
regression test for #103626
kadiwa4 Feb 19, 2024
d959730
Rollup merge of #116016 - jhpratt:kill-rustc-serialize, r=dtolnay
matthiaskrgr Mar 23, 2024
e07a5aa
Rollup merge of #121281 - kadiwa4:test_103626, r=estebank,lcnr
matthiaskrgr Mar 23, 2024
d0e27af
Rollup merge of #122168 - compiler-errors:inline-coroutine-body-valid…
matthiaskrgr Mar 23, 2024
08bb35e
Rollup merge of #122217 - estebank:issue-119685, r=fmease
matthiaskrgr Mar 23, 2024
f68a0f1
Rollup merge of #122379 - RalfJung:int2ptr-transmute, r=m-ou-se
matthiaskrgr Mar 23, 2024
88574e1
Rollup merge of #122907 - compiler-errors:uniquify-reerror, r=lcnr
matthiaskrgr Mar 23, 2024
35310b7
Rollup merge of #122942 - Luv-Ray:master, r=lcnr
matthiaskrgr Mar 23, 2024
5f5362d
Rollup merge of #122943 - matthiaskrgr:ice-tests-9xxxx-to-12xxxx, r=f…
matthiaskrgr Mar 23, 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 ICE "raw ptr comparison should already be caught in the …
…trait system" #105047

Fixes #105047
  • Loading branch information
matthiaskrgr committed Mar 23, 2024
commit f1f287fadb91451b116ff00a2f8b9c32c5e1571b
15 changes: 15 additions & 0 deletions tests/ui/raw-ref-op/const-eval-compare-ice-105047.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// issue: rust-lang/rust#105047
// ICE raw ptr comparison should already be caught in the trait systems

#![feature(raw_ref_op)]

const RCZ: *const i32 = &raw const *&0;

const fn f() {
if let RCZ = &raw const *&0 { }
//~^ WARN function pointers and raw pointers not derived from integers in patterns
//~^^ ERROR pointers cannot be reliably compared during const eval
//~^^^ WARN this was previously accepted by the compiler but is being phased out
}

fn main() {}
31 changes: 31 additions & 0 deletions tests/ui/raw-ref-op/const-eval-compare-ice-105047.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
warning: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
--> $DIR/const-eval-compare-ice-105047.rs:9:12
|
LL | if let RCZ = &raw const *&0 { }
| ^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #120362 <https://github.com/rust-lang/rust/issues/120362>
= note: `#[warn(pointer_structural_match)]` on by default

error: pointers cannot be reliably compared during const eval
--> $DIR/const-eval-compare-ice-105047.rs:9:12
|
LL | if let RCZ = &raw const *&0 { }
| ^^^
|
= note: see issue #53020 <https://github.com/rust-lang/rust/issues/53020> for more information

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

Future incompatibility report: Future breakage diagnostic:
warning: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
--> $DIR/const-eval-compare-ice-105047.rs:9:12
|
LL | if let RCZ = &raw const *&0 { }
| ^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #120362 <https://github.com/rust-lang/rust/issues/120362>
= note: `#[warn(pointer_structural_match)]` on by default