diff --git a/fixed/99647.sh b/fixed/99647.sh index 0e030948..9d0d523d 100755 --- a/fixed/99647.sh +++ b/fixed/99647.sh @@ -13,4 +13,3 @@ async fn bar() {} fn main() {} EOF - diff --git a/ices/100612.sh b/ices/100612.sh index 455bed53..6143d9c4 100755 --- a/ices/100612.sh +++ b/ices/100612.sh @@ -22,4 +22,3 @@ fn main() { } EOF - diff --git a/ices/101198.rs b/ices/101198.rs new file mode 100644 index 00000000..b31a89d7 --- /dev/null +++ b/ices/101198.rs @@ -0,0 +1,31 @@ +#![no_std] +#![feature(lang_items, start)] +#![crate_type="lib"] + +#[lang = "owned_box"] +struct Box(*mut T); + +#[lang = "exchange_malloc"] +unsafe fn alloc() -> *mut u8 { + core::ptr::null_mut() +} + +#[lang = "box_free"] +unsafe fn free(ptr: *mut T) { } + +impl Box { + pub fn new(val: T) -> Box { + Box::new(val) + } +} + +#[start] +fn main(i: isize, args: *const *const u8) -> isize { + let x = Box::new(3); + 0 +} + +#[panic_handler] +fn panic_handler(_: &core::panic::PanicInfo) -> ! { + loop {} +} diff --git a/ices/101518-1.sh b/ices/101518-1.sh index f0e1474a..16669a18 100644 --- a/ices/101518-1.sh +++ b/ices/101518-1.sh @@ -1,7 +1,6 @@ #!/bin/bash -rustc -Cincremental=/tmp/a -Zincremental-verify-ich=yes --crate-type lib - <<'EOF' - +rustc -Cincremental=/tmp/a -Zincremental-verify-ich=yes --crate-type lib - <<'EOF' #[derive(PartialEq, Eq)] struct Id<'a> { diff --git a/ices/101518-2.sh b/ices/101518-2.sh index 1c2e5893..a8b7ae58 100644 --- a/ices/101518-2.sh +++ b/ices/101518-2.sh @@ -1,6 +1,6 @@ #!/bin/bash -rustc -Cincremental=/tmp/a -Zincremental-verify-ich=yes --crate-type lib - <<'EOF' +rustc -Cincremental=/tmp/a -Zincremental-verify-ich=yes --crate-type lib - <<'EOF' #[derive(Eq, PartialEq)] struct Id(&'static str); diff --git a/ices/101852.rs b/ices/101852.rs index 7bbb4a70..3c55fae7 100644 --- a/ices/101852.rs +++ b/ices/101852.rs @@ -6,5 +6,4 @@ pub fn ice( Vec::new() } -fn main() { -} +fn main() {} diff --git a/ices/101962.rs b/ices/101962.rs index b4e3b825..f2203212 100644 --- a/ices/101962.rs +++ b/ices/101962.rs @@ -4,6 +4,6 @@ pub fn wrapping(a: T, b: T) { let _z = core::intrinsics::wrapping_mul(a, b); } -pub fn main() { +fn main() { wrapping(1,2); } diff --git a/ices/101964.rs b/ices/101964.rs index 7805e716..bd3ab58a 100644 --- a/ices/101964.rs +++ b/ices/101964.rs @@ -1,4 +1,3 @@ - #![crate_type = "lib"] #![feature(lang_items)] #![no_std] diff --git a/ices/103899.rs b/ices/103899.rs new file mode 100644 index 00000000..cd54c65e --- /dev/null +++ b/ices/103899.rs @@ -0,0 +1,25 @@ +trait BaseWithAssoc { + type Assoc; +} + +trait WrapperWithAssoc { + type BaseAssoc: BaseWithAssoc; +} + +struct Wrapper { + inner: B, +} + +struct ProjectToBase { + data_type_h: T::Assoc, +} + +struct DoubleProject { + buffer: Wrapper>, +} + +fn trigger>() -> DoubleProject { + loop {} +} + +fn main() {} diff --git a/ices/104196.rs b/ices/104196.rs new file mode 100644 index 00000000..f416b2be --- /dev/null +++ b/ices/104196.rs @@ -0,0 +1,36 @@ +use core::future::Future; + +pub struct Struct +where + F: Fn(&C) -> Fu, + Fu: Future, +{ + handler: F, + context: C, +} + +impl Struct +where + F: Fn(&C) -> Fu, + Fu: Future, +{ + pub const fn new(handler: F, context: C) -> Self { + Self { handler, context } + } +} + +type TestC = &'static usize; +type TestFu = impl Future; +type TestF = impl Fn(&TestC) -> TestFu; +type TestStruct = Struct; + +async fn test_handler(context: &TestC) -> () { + () +} + +fn get_test_struct() -> &'static TestStruct { + static test_actor: TestStruct = TestStruct::new(test_handler, &0); + &test_actor +} + +fn main() {} diff --git a/ices/104779.rs b/ices/104779.rs new file mode 100644 index 00000000..cab6d0b5 --- /dev/null +++ b/ices/104779.rs @@ -0,0 +1,18 @@ +struct Inv<'a>(&'a mut &'a ()); +enum Foo { + Bar, + Var(T), +} +type Subtype = Foo fn(Inv<'a>, Inv<'b>)>; +type Supertype = Foo fn(Inv<'a>, Inv<'a>)>; + +fn foo() -> impl Sized { + loop { + match foo() { + Subtype::Bar => (), + Supertype::Var(x) => {} + } + } +} + +fn main() {} diff --git a/ices/105228.rs b/ices/105228.rs new file mode 100644 index 00000000..402176dc --- /dev/null +++ b/ices/105228.rs @@ -0,0 +1,9 @@ +#![feature(cfg_eval)] +#![feature(stmt_expr_attributes)] + +#[cfg_eval] +fn main() { + #[cfg_eval] + let _ = #[cfg(FALSE)] 0; + //~^ ERROR removing an expression is not supported in this position +} diff --git a/ices/105231.rs b/ices/105231.rs new file mode 100644 index 00000000..e01a3b31 --- /dev/null +++ b/ices/105231.rs @@ -0,0 +1,6 @@ +struct A(B); +struct B(A>); +trait Foo {} +impl Foo for T where T: Send {} +impl Foo for B {} +fn main() {} diff --git a/ices/105273.sh b/ices/105273.sh new file mode 100644 index 00000000..36f740f4 --- /dev/null +++ b/ices/105273.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +rustc "-Zunpretty=ast-tree" - <<'EOF' + +#![c = ({(while ""))(); + +EOF diff --git a/ices/105305.rs b/ices/105305.rs new file mode 100644 index 00000000..0be2839d --- /dev/null +++ b/ices/105305.rs @@ -0,0 +1,12 @@ +#![feature(inherent_associated_types)] +#![allow(incomplete_features)] + +struct S(T); + +impl S { // Also repros with any other lifetimes such as '_ ,switching order to 'a, T also repros. + type P = T; +} + +fn main() { + type A = S<()>::P; +} diff --git a/ices/105321.rs b/ices/105321.rs new file mode 100644 index 00000000..891ec33b --- /dev/null +++ b/ices/105321.rs @@ -0,0 +1,11 @@ +fn hof(_: F) +where + F: FnMut() -> (), +{ +} + +fn f() -> _ { + hof(f); +} + +fn main() {} diff --git a/ices/105334.sh b/ices/105334.sh new file mode 100644 index 00000000..f63ab927 --- /dev/null +++ b/ices/105334.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +cat > out.rs <<'EOF' + +impl Vec< br##"*.."## > {} + +fn main() {} + +EOF + +rustdoc out.rs diff --git a/ices/98171.sh b/ices/98171.sh deleted file mode 100755 index 4a5b0ffc..00000000 --- a/ices/98171.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash - -cat > out.rs <<'EOF' - -// Issue 22443: Reject code using non-regular types that would -// otherwise cause dropck to loop infinitely. - -use std::marker::PhantomData; - -struct Digit { - elem: T -} - -struct Node { m: PhantomData<&'static T> } - - -enum FingerTree { - Single(T), - // Bug report said Digit after Box would stack overflow (versus - // Digit before Box; see dropck_no_diverge_on_nonregular_2). - Deep( - Box>>, - Digit, - ) -} - -fn main() { - let ft = //~ ERROR overflow while adding drop-check rules for FingerTree - FingerTree::Single(1); - //~^ ERROR overflow while adding drop-check rules for FingerTree -} - - -EOF - -rustdoc out.rs diff --git a/ices/98250.sh b/ices/98250.sh index 9baa4c75..bbb85345 100755 --- a/ices/98250.sh +++ b/ices/98250.sh @@ -21,7 +21,6 @@ fn foo() -> Foo { fn main() {} - EOF -rustdoc out.rs +rustdoc out.rs diff --git a/ices/99363.sh b/ices/99363.sh index 230377be..40af36c0 100755 --- a/ices/99363.sh +++ b/ices/99363.sh @@ -16,4 +16,3 @@ fn main() { } EOF -