Skip to content

Commit d9fba2d

Browse files
committed
Move crash test.
1 parent 47bdbd3 commit d9fba2d

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
1-
//@ known-bug: #135128
1+
//! Verify that we do not ICE when optimizing bodies with nonsensical bounds.
22
//@ compile-flags: -Copt-level=1
33
//@ edition: 2021
4+
//@ build-pass
45

56
#![feature(trivial_bounds)]
67

78
async fn return_str() -> str
89
where
910
str: Sized,
11+
//~^ WARN trait bound str: Sized does not depend on any type or lifetime parameters
1012
{
1113
*"Sized".to_string().into_boxed_str()
1214
}
15+
1316
fn main() {}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
warning: trait bound str: Sized does not depend on any type or lifetime parameters
2+
--> $DIR/gvn-nonsensical-sized-str.rs:10:10
3+
|
4+
LL | str: Sized,
5+
| ^^^^^
6+
|
7+
= note: `#[warn(trivial_bounds)]` on by default
8+
9+
warning: 1 warning emitted
10+

0 commit comments

Comments
 (0)