bless a few trivial tests under polonius
These are all about reaching some type and recursion limits and saving the full type in a file, whose folder changes in this compare-mode.
This commit is contained in:
parent
f252ab1565
commit
1392842966
15
src/test/ui/infinite/infinite-instantiation.polonius.stderr
Normal file
15
src/test/ui/infinite/infinite-instantiation.polonius.stderr
Normal file
@ -0,0 +1,15 @@
|
||||
error: reached the recursion limit while instantiating `function::<Option<Option<Option<...>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
|
||||
--> $DIR/infinite-instantiation.rs:22:9
|
||||
|
|
||||
LL | function(counter - 1, t.to_option());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
note: `function` defined here
|
||||
--> $DIR/infinite-instantiation.rs:20:1
|
||||
|
|
||||
LL | fn function<T:ToOpt + Clone>(counter: usize, t: T) {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
= note: the full type name has been written to '$TEST_BUILD_DIR/infinite/infinite-instantiation.polonius/infinite-instantiation.long-type.txt'
|
||||
|
||||
error: aborting due to previous error
|
||||
|
15
src/test/ui/issues/issue-22638.polonius.stderr
Normal file
15
src/test/ui/issues/issue-22638.polonius.stderr
Normal file
@ -0,0 +1,15 @@
|
||||
error: reached the recursion limit while instantiating `A::matches::$CLOSURE`
|
||||
--> $DIR/issue-22638.rs:56:9
|
||||
|
|
||||
LL | a.matches(f)
|
||||
| ^^^^^^^^^^^^
|
||||
|
|
||||
note: `A::matches` defined here
|
||||
--> $DIR/issue-22638.rs:15:5
|
||||
|
|
||||
LL | pub fn matches<F: Fn()>(&self, f: &F) {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
= note: the full type name has been written to '$TEST_BUILD_DIR/issues/issue-22638.polonius/issue-22638.long-type.txt'
|
||||
|
||||
error: aborting due to previous error
|
||||
|
@ -0,0 +1,15 @@
|
||||
error: reached the recursion limit while instantiating `<(&(&(&(&(&(&(&(&(&(&(&(&(&(&(&(.....), ...), ...) as Foo>::recurse`
|
||||
--> $DIR/issue-37311.rs:17:9
|
||||
|
|
||||
LL | (self, self).recurse();
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
note: `<T as Foo>::recurse` defined here
|
||||
--> $DIR/issue-37311.rs:16:5
|
||||
|
|
||||
LL | fn recurse(&self) {
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
= note: the full type name has been written to '$TEST_BUILD_DIR/issues/issue-37311-type-length-limit/issue-37311.polonius/issue-37311.long-type.txt'
|
||||
|
||||
error: aborting due to previous error
|
||||
|
17
src/test/ui/issues/issue-67552.polonius.stderr
Normal file
17
src/test/ui/issues/issue-67552.polonius.stderr
Normal file
@ -0,0 +1,17 @@
|
||||
error: reached the recursion limit while instantiating `rec::<&mut &mut &mut &mut &mut &... &mut &mut &mut &mut &mut Empty>`
|
||||
--> $DIR/issue-67552.rs:28:9
|
||||
|
|
||||
LL | rec(identity(&mut it))
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
note: `rec` defined here
|
||||
--> $DIR/issue-67552.rs:21:1
|
||||
|
|
||||
LL | / fn rec<T>(mut it: T)
|
||||
LL | | where
|
||||
LL | | T: Iterator,
|
||||
| |________________^
|
||||
= note: the full type name has been written to '$TEST_BUILD_DIR/issues/issue-67552.polonius/issue-67552.long-type.txt'
|
||||
|
||||
error: aborting due to previous error
|
||||
|
26
src/test/ui/issues/issue-8727.polonius.stderr
Normal file
26
src/test/ui/issues/issue-8727.polonius.stderr
Normal file
@ -0,0 +1,26 @@
|
||||
warning: function cannot return without recursing
|
||||
--> $DIR/issue-8727.rs:7:1
|
||||
|
|
||||
LL | fn generic<T>() {
|
||||
| ^^^^^^^^^^^^^^^ cannot return without recursing
|
||||
LL | generic::<Option<T>>();
|
||||
| ---------------------- recursive call site
|
||||
|
|
||||
= note: `#[warn(unconditional_recursion)]` on by default
|
||||
= help: a `loop` may express intention better if this is on purpose
|
||||
|
||||
error: reached the recursion limit while instantiating `generic::<Option<Option<Option<O...>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
|
||||
--> $DIR/issue-8727.rs:8:5
|
||||
|
|
||||
LL | generic::<Option<T>>();
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
note: `generic` defined here
|
||||
--> $DIR/issue-8727.rs:7:1
|
||||
|
|
||||
LL | fn generic<T>() {
|
||||
| ^^^^^^^^^^^^^^^
|
||||
= note: the full type name has been written to '$TEST_BUILD_DIR/issues/issue-8727.polonius/issue-8727.long-type.txt'
|
||||
|
||||
error: aborting due to previous error; 1 warning emitted
|
||||
|
@ -0,0 +1,15 @@
|
||||
error: reached the recursion limit while instantiating `std::ptr::drop_in_place::<S<fn(f...)))))))))))))))))))))))))))))>))`
|
||||
--> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
|
||||
|
|
||||
LL | pub unsafe fn drop_in_place<T: ?Sized>(to_drop: *mut T) {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
note: `std::ptr::drop_in_place` defined here
|
||||
--> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
|
||||
|
|
||||
LL | pub unsafe fn drop_in_place<T: ?Sized>(to_drop: *mut T) {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
= note: the full type name has been written to '$TEST_BUILD_DIR/recursion/issue-38591-non-regular-dropck-recursion.polonius/issue-38591-non-regular-dropck-recursion.long-type.txt'
|
||||
|
||||
error: aborting due to previous error
|
||||
|
15
src/test/ui/recursion/recursion.polonius.stderr
Normal file
15
src/test/ui/recursion/recursion.polonius.stderr
Normal file
@ -0,0 +1,15 @@
|
||||
error: reached the recursion limit while instantiating `test::<Cons<Cons<Cons<Cons<Cons<...>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
|
||||
--> $DIR/recursion.rs:18:11
|
||||
|
|
||||
LL | _ => {test (n-1, i+1, Cons {head:2*i+1, tail:first}, Cons{head:i*i, tail:second})}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
note: `test` defined here
|
||||
--> $DIR/recursion.rs:16:1
|
||||
|
|
||||
LL | fn test<T:Dot> (n:isize, i:isize, first:T, second:T) ->isize {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
= note: the full type name has been written to '$TEST_BUILD_DIR/recursion/recursion.polonius/recursion.long-type.txt'
|
||||
|
||||
error: aborting due to previous error
|
||||
|
11
src/test/ui/type_length_limit.polonius.stderr
Normal file
11
src/test/ui/type_length_limit.polonius.stderr
Normal file
@ -0,0 +1,11 @@
|
||||
error: reached the type-length limit while instantiating `std::mem::drop::<Option<((((...,....., ...), ..., ...), ..., ...)>>`
|
||||
--> $SRC_DIR/core/src/mem/mod.rs:LL:COL
|
||||
|
|
||||
LL | pub fn drop<T>(_x: T) {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: the full type name has been written to '$TEST_BUILD_DIR/type_length_limit.polonius/type_length_limit.long-type.txt'
|
||||
= help: consider adding a `#![type_length_limit="8"]` attribute to your crate
|
||||
|
||||
error: aborting due to previous error
|
||||
|
Loading…
x
Reference in New Issue
Block a user