Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit d8a6a1d

Browse files
committedMar 14, 2025
More tests
1 parent b14523c commit d8a6a1d

File tree

4 files changed

+47
-0
lines changed

4 files changed

+47
-0
lines changed
 
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
//@ check-pass
2+
3+
#![feature(precise_capturing_of_types)]
4+
//~^ WARN the feature `precise_capturing_of_types` is incomplete
5+
6+
fn uncaptured<T>() -> impl Sized + use<> {}
7+
8+
fn main() {
9+
let mut x = uncaptured::<i32>();
10+
x = uncaptured::<u32>();
11+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
warning: the feature `precise_capturing_of_types` is incomplete and may not be safe to use and/or cause compiler crashes
2+
--> $DIR/of-types-eq-uncaptured.rs:3:12
3+
|
4+
LL | #![feature(precise_capturing_of_types)]
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
6+
|
7+
= note: see issue #130043 <https://github.com/rust-lang/rust/issues/130043> for more information
8+
= note: `#[warn(incomplete_features)]` on by default
9+
10+
warning: 1 warning emitted
11+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
//@ check-pass
2+
3+
#![feature(precise_capturing_of_types)]
4+
//~^ WARN the feature `precise_capturing_of_types` is incomplete
5+
6+
fn uncaptured<T>() -> impl Sized + use<> {}
7+
8+
fn outlives_static<T: 'static>(_: T) {}
9+
10+
fn foo<'a>() {
11+
outlives_static(uncaptured::<&'a ()>());
12+
}
13+
14+
fn main() {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
warning: the feature `precise_capturing_of_types` is incomplete and may not be safe to use and/or cause compiler crashes
2+
--> $DIR/of-types-outlives.rs:3:12
3+
|
4+
LL | #![feature(precise_capturing_of_types)]
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
6+
|
7+
= note: see issue #130043 <https://github.com/rust-lang/rust/issues/130043> for more information
8+
= note: `#[warn(incomplete_features)]` on by default
9+
10+
warning: 1 warning emitted
11+

0 commit comments

Comments
 (0)
Failed to load comments.