Skip to content
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 8 pull requests #122190

Merged
merged 20 commits into from
Mar 8, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
e760c44
Use `ControlFlow` in AST visitors.
Jarcho Feb 24, 2024
822b10d
Use `ControlFlow` in HIR visitors
Jarcho Feb 24, 2024
63091b1
Make `arg_expand_all` not short-circuit on first error
beetrees May 15, 2023
fb87e60
Refactor argument UTF-8 checking into `rustc_driver::args::raw_args()`
beetrees May 15, 2023
d626d13
Use `rustc_driver::args::raw_args()` in Clippy
beetrees May 15, 2023
2d7d0bd
Use `rustc_driver::args::raw_args()` in Miri
beetrees May 15, 2023
bed9d1f
Add known-bug tests for `derive(PartialEq)` mismatches with `#[repr(p…
oli-obk Mar 7, 2024
025ad40
Don't ICE in CTFE if raw/fn-ptr types differ
compiler-errors Mar 8, 2024
ece20f0
Bless tidy issues order
chenyukang Mar 8, 2024
c2f13db
rustc: Fix typo
heiher Mar 8, 2024
2e5f86c
interpret: update comment about read_discriminant on uninhabited vari…
RalfJung Mar 8, 2024
c81521a
Fix crash in late internal checking
chenyukang Mar 8, 2024
075f1c3
Rollup merge of #121025 - oli-obk:taint_after_errors, r=petrochenkov
matthiaskrgr Mar 8, 2024
a8e3543
Rollup merge of #121194 - beetrees:rustc-raw-args, r=petrochenkov
matthiaskrgr Mar 8, 2024
3e634f8
Rollup merge of #121563 - Jarcho:use_cf, r=petrochenkov
matthiaskrgr Mar 8, 2024
3d71bad
Rollup merge of #122173 - compiler-errors:ptr-equality-in-ctfe, r=lcnr
matthiaskrgr Mar 8, 2024
af3d06c
Rollup merge of #122175 - chenyukang:yukang-fix-tidy-issues, r=workin…
matthiaskrgr Mar 8, 2024
9fd60c5
Rollup merge of #122179 - heiher:fix-typo, r=lcnr
matthiaskrgr Mar 8, 2024
a08a5d4
Rollup merge of #122181 - chenyukang:yukang-fix-late-lint-crash, r=ol…
matthiaskrgr Mar 8, 2024
8abeac2
Rollup merge of #122183 - RalfJung:read-discriminant-uninhabited-vari…
matthiaskrgr Mar 8, 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
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,6 @@ impl<'tcx> Visitor<'tcx> for Checker<'_, 'tcx> {
if is_int_bool_or_char(lhs_ty) && is_int_bool_or_char(rhs_ty) {
// Int, bool, and char operations are fine.
} else if lhs_ty.is_fn_ptr() || lhs_ty.is_unsafe_ptr() {
assert_eq!(lhs_ty, rhs_ty);
assert!(matches!(
op,
BinOp::Eq
Expand Down
6 changes: 6 additions & 0 deletions tests/ui/consts/different-fn-ptr-binders-during-ctfe.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
const fn cmp(x: fn(&'static ()), y: for<'a> fn(&'a ())) -> bool {
x == y
//~^ ERROR pointers cannot be reliably compared during const eval
}

fn main() {}
10 changes: 10 additions & 0 deletions tests/ui/consts/different-fn-ptr-binders-during-ctfe.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
error: pointers cannot be reliably compared during const eval
--> $DIR/different-fn-ptr-binders-during-ctfe.rs:2:5
|
LL | x == y
| ^^^^^^
|
= note: see issue #53020 <https://github.com/rust-lang/rust/issues/53020> for more information

error: aborting due to 1 previous error