From 4547b622d8d29df964fa2914213088b148c498fc Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:18:32 +0200 Subject: Merging upstream version 1.67.1+dfsg1. Signed-off-by: Daniel Baumann --- .../issue-85031-2.rs | 14 ---------- src/test/incremental/hashes/extern_mods.rs | 4 +-- src/test/incremental/issue-101518.rs | 31 ++++++++++++++++++++++ 3 files changed, 33 insertions(+), 16 deletions(-) delete mode 100644 src/test/incremental/const-generics/try_unify_abstract_const_regression_tests/issue-85031-2.rs create mode 100644 src/test/incremental/issue-101518.rs (limited to 'src/test/incremental') diff --git a/src/test/incremental/const-generics/try_unify_abstract_const_regression_tests/issue-85031-2.rs b/src/test/incremental/const-generics/try_unify_abstract_const_regression_tests/issue-85031-2.rs deleted file mode 100644 index db1e2fc2a..000000000 --- a/src/test/incremental/const-generics/try_unify_abstract_const_regression_tests/issue-85031-2.rs +++ /dev/null @@ -1,14 +0,0 @@ -// revisions: cfail -#![allow(incomplete_features)] -#![feature(generic_const_exprs)] - -pub struct Ref<'a>(&'a i32); - -impl<'a> Ref<'a> { - pub fn foo() -> [(); A - 0] { - Self::foo() - //~^ error: type annotations needed - } -} - -fn main() {} diff --git a/src/test/incremental/hashes/extern_mods.rs b/src/test/incremental/hashes/extern_mods.rs index ff79acc7f..3121abbea 100644 --- a/src/test/incremental/hashes/extern_mods.rs +++ b/src/test/incremental/hashes/extern_mods.rs @@ -128,7 +128,7 @@ extern "C" { // Change calling convention --------------------------------------------------- #[cfg(any(cfail1,cfail4))] extern "C" { - pub fn change_calling_convention(c: i32); + pub fn change_calling_convention(c: (i32,)); } #[cfg(not(any(cfail1,cfail4)))] @@ -137,7 +137,7 @@ extern "C" { #[rustc_clean(cfg = "cfail5", except = "hir_owner,hir_owner_nodes")] #[rustc_clean(cfg = "cfail6")] extern "rust-call" { - pub fn change_calling_convention(c: i32); + pub fn change_calling_convention(c: (i32,)); } // Make function public -------------------------------------------------------- diff --git a/src/test/incremental/issue-101518.rs b/src/test/incremental/issue-101518.rs new file mode 100644 index 000000000..501be175f --- /dev/null +++ b/src/test/incremental/issue-101518.rs @@ -0,0 +1,31 @@ +// revisions: cfail1 +// should-ice +// error-pattern: forcing query +// known-bug: #101518 + +#[derive(PartialEq, Eq)] +struct Id<'a> { + ns: &'a str, +} +fn visit_struct() { + let id = Id { ns: "random1" }; + const FLAG: Id<'static> = Id { + ns: "needs_to_be_the_same", + }; + match id { + FLAG => {} + _ => {} + } +} +fn visit_struct2() { + let id = Id { ns: "random2" }; + const FLAG: Id<'static> = Id { + ns: "needs_to_be_the_same", + }; + match id { + FLAG => {} + _ => {} + } +} + +fn main() {} -- cgit v1.2.3