Rollup merge of #60169 - varkor:tidy-unnecessary-ignore-newline, r=kennytm
Warn when ignore-tidy-linelength is present, but no lines are too long It's easy for a `// ignore-tidy-linelength` to be added when there is a genuine need to ignore a file's line length, but then after refactoring the need is gone, but the tidy directive is not removed. This means that in the future, further editing may accidentally add unnecessarily long lines. This change forces `// ignore-tidy-linelength` to be used exactly when necessary, to make sure such changes are intentional.
This commit is contained in:
commit
d1b2d6d64d
@ -1,5 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
# ignore-tidy-linelength
|
||||
|
||||
set -ex
|
||||
|
||||
|
@ -1,7 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# ignore-tidy-linelength
|
||||
|
||||
set -ex
|
||||
source shared.sh
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
// ignoring this test until MIR codegen has taken over completely
|
||||
// ignore-test
|
||||
|
||||
// ignore-tidy-linelength
|
||||
// compile-flags:-Zprint-mono-items=eager
|
||||
|
||||
#![deny(dead_code)]
|
||||
|
@ -1,4 +1,3 @@
|
||||
// ignore-tidy-linelength
|
||||
// compile-flags:-Zprint-mono-items=eager
|
||||
|
||||
#![deny(dead_code)]
|
||||
|
@ -1,4 +1,3 @@
|
||||
// ignore-tidy-linelength
|
||||
// compile-flags:-Zprint-mono-items=eager
|
||||
|
||||
#![deny(dead_code)]
|
||||
|
@ -1,4 +1,3 @@
|
||||
// ignore-tidy-linelength
|
||||
// compile-flags:-Zprint-mono-items=eager
|
||||
|
||||
#![deny(dead_code)]
|
||||
|
@ -1,4 +1,3 @@
|
||||
// ignore-tidy-linelength
|
||||
// compile-flags:-Zprint-mono-items=eager
|
||||
|
||||
#![deny(dead_code)]
|
||||
|
@ -1,4 +1,3 @@
|
||||
// ignore-tidy-linelength
|
||||
// compile-flags:-Zprint-mono-items=eager
|
||||
|
||||
#![deny(dead_code)]
|
||||
|
@ -1,4 +1,3 @@
|
||||
// ignore-tidy-linelength
|
||||
// compile-flags:-Zprint-mono-items=eager
|
||||
|
||||
#![deny(dead_code)]
|
||||
|
@ -1,4 +1,3 @@
|
||||
// ignore-tidy-linelength
|
||||
// compile-flags:-Zprint-mono-items=eager
|
||||
|
||||
#![deny(dead_code)]
|
||||
|
@ -1,4 +1,3 @@
|
||||
// ignore-tidy-linelength
|
||||
// compile-flags:-Zprint-mono-items=eager
|
||||
|
||||
#![deny(dead_code)]
|
||||
|
@ -1,4 +1,3 @@
|
||||
// ignore-tidy-linelength
|
||||
// compile-flags:-Zprint-mono-items=eager
|
||||
|
||||
#![deny(dead_code)]
|
||||
|
@ -1,5 +1,4 @@
|
||||
// compile-flags:-Zprint-mono-items=eager
|
||||
// ignore-tidy-linelength
|
||||
|
||||
#![feature(start)]
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
// ignore-tidy-linelength
|
||||
// compile-flags:-Zprint-mono-items=eager
|
||||
|
||||
#![deny(dead_code)]
|
||||
|
@ -1,4 +1,3 @@
|
||||
// ignore-tidy-linelength
|
||||
// compile-flags:-Zprint-mono-items=eager
|
||||
|
||||
#![deny(dead_code)]
|
||||
|
@ -1,4 +1,3 @@
|
||||
// ignore-tidy-linelength
|
||||
// compile-flags:-Zprint-mono-items=eager
|
||||
|
||||
#![deny(dead_code)]
|
||||
|
@ -1,4 +1,3 @@
|
||||
// ignore-tidy-linelength
|
||||
// compile-flags:-Zprint-mono-items=eager
|
||||
|
||||
#![deny(dead_code)]
|
||||
|
@ -1,4 +1,3 @@
|
||||
// ignore-tidy-linelength
|
||||
// compile-flags:-Zprint-mono-items=lazy
|
||||
|
||||
#![deny(dead_code)]
|
||||
|
@ -1,4 +1,3 @@
|
||||
// ignore-tidy-linelength
|
||||
// compile-flags:-Zprint-mono-items=lazy
|
||||
|
||||
// N.B., we do not expect *any* monomorphization to be generated here.
|
||||
|
@ -1,4 +1,3 @@
|
||||
// ignore-tidy-linelength
|
||||
// compile-flags:-Zprint-mono-items=eager
|
||||
// compile-flags:-Zinline-in-all-cgus
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
// ignore-tidy-linelength
|
||||
// compile-flags:-Zprint-mono-items=eager
|
||||
|
||||
#![crate_type="lib"]
|
||||
|
@ -1,4 +1,3 @@
|
||||
// ignore-tidy-linelength
|
||||
// We specify -Z incremental here because we want to test the partitioning for
|
||||
// incremental compilation
|
||||
// compile-flags:-Zprint-mono-items=lazy -Zincremental=tmp/partitioning-tests/statics
|
||||
|
@ -1,5 +1,4 @@
|
||||
// compile-flags: -C no-prepopulate-passes
|
||||
// ignore-tidy-linelength
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
|
@ -2,7 +2,6 @@
|
||||
// before 7.0, then backported to the Rust LLVM fork. It tests that
|
||||
// optimized enum debug info accurately reflects the enum layout.
|
||||
|
||||
// ignore-tidy-linelength
|
||||
// ignore-windows
|
||||
// min-system-llvm-version 8.0
|
||||
|
||||
|
@ -2,7 +2,6 @@
|
||||
// before 7.0, then backported to the Rust LLVM fork. It tests that
|
||||
// debug info for tagged (ordinary) enums is properly emitted.
|
||||
|
||||
// ignore-tidy-linelength
|
||||
// ignore-windows
|
||||
// min-system-llvm-version 8.0
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
// ignore-tidy-linelength
|
||||
// ignore-windows
|
||||
|
||||
// compile-flags: -g -C no-prepopulate-passes
|
||||
|
@ -1,7 +1,6 @@
|
||||
// This test depends on a patch that was committed to upstream LLVM
|
||||
// before 4.0, formerly backported to the Rust LLVM fork.
|
||||
|
||||
// ignore-tidy-linelength
|
||||
// ignore-windows
|
||||
// ignore-macos
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
// ignore-tidy-linelength
|
||||
// ignore-windows
|
||||
// ignore-macos
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
// compile-flags: -g -C no-prepopulate-passes
|
||||
// ignore-tidy-linelength
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
// compile-flags: -g -C no-prepopulate-passes
|
||||
// ignore-tidy-linelength
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
|
@ -1,5 +1,3 @@
|
||||
// ignore-tidy-linelength
|
||||
|
||||
// This test is for *-windows-msvc only.
|
||||
// ignore-android
|
||||
// ignore-bitrig
|
||||
|
@ -1,5 +1,4 @@
|
||||
// compile-flags: -C no-prepopulate-passes
|
||||
// ignore-tidy-linelength
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
// ignore-windows
|
||||
// ignore-tidy-linelength
|
||||
// compile-flags: -g -C metadata=foo -C no-prepopulate-passes
|
||||
// aux-build:xcrate-generic.rs
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
// This test depends on a patch that was committed to upstream LLVM
|
||||
// after 5.0, then backported to the Rust LLVM fork.
|
||||
|
||||
// ignore-tidy-linelength
|
||||
// ignore-windows
|
||||
// ignore-macos
|
||||
|
||||
|
@ -1,5 +1,3 @@
|
||||
// ignore-tidy-linelength
|
||||
|
||||
// Require LLVM with DW_TAG_variant_part and a gdb that can read it.
|
||||
// min-system-llvm-version: 8.0
|
||||
// min-gdb-version: 8.2
|
||||
|
@ -1,4 +1,3 @@
|
||||
// ignore-tidy-linelength
|
||||
// ignore-lldb: FIXME(#27089)
|
||||
// min-lldb-version: 310
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
// ignore-tidy-linelength
|
||||
// ignore-lldb
|
||||
|
||||
// Require LLVM with DW_TAG_variant_part and a gdb that can read it.
|
||||
|
@ -1,5 +1,3 @@
|
||||
// ignore-tidy-linelength
|
||||
|
||||
// Require LLVM with DW_TAG_variant_part and a gdb and lldb that can
|
||||
// read it.
|
||||
// min-system-llvm-version: 8.0
|
||||
|
@ -1,5 +1,3 @@
|
||||
// ignore-tidy-linelength
|
||||
|
||||
//[rpass1] compile-flags: -g
|
||||
//[rpass2] compile-flags: -g
|
||||
//[rpass3] compile-flags: -g --remap-path-prefix={{src-base}}=/the/src
|
||||
|
@ -5,8 +5,6 @@
|
||||
// so subtle breakage in them can leave a quite hard-to-find trail of
|
||||
// destruction.
|
||||
|
||||
// ignore-tidy-linelength
|
||||
|
||||
fn main() {
|
||||
let nodrop_x = false;
|
||||
let nodrop_y;
|
||||
|
@ -5,7 +5,6 @@
|
||||
|
||||
// compile-flags:-Zborrowck=mir -Zverbose
|
||||
// ^^^^^^^^^ force compiler to dump more region information
|
||||
// ignore-tidy-linelength
|
||||
|
||||
#![allow(warnings)]
|
||||
|
||||
|
@ -1,5 +1,3 @@
|
||||
// ignore-tidy-linelength
|
||||
|
||||
fn main() {
|
||||
let a = 0;
|
||||
{
|
||||
|
@ -3,8 +3,8 @@
|
||||
|
||||
// this file has some special \r\n endings (use xxd to see them)
|
||||
|
||||
fn main() {assert_eq!(b"", b"\
|
||||
fn main() {assert_eq!(b"", b"\
|
||||
");
|
||||
assert_eq!(b"\n", b"
|
||||
assert_eq!(b"\n", b"
|
||||
");
|
||||
}
|
||||
|
@ -1,5 +1,3 @@
|
||||
// ignore-tidy-end-whitespace
|
||||
|
||||
#![deny(intra_doc_link_resolution_failure)]
|
||||
|
||||
// An error in calculating spans while reporting intra-doc link resolution errors caused rustdoc to
|
||||
|
@ -1,11 +1,11 @@
|
||||
error: `[i]` cannot be resolved, ignoring it...
|
||||
--> $DIR/intra-link-span-ice-55723.rs:11:10
|
||||
--> $DIR/intra-link-span-ice-55723.rs:9:10
|
||||
|
|
||||
LL | /// (arr[i])
|
||||
| ^ cannot be resolved, ignoring
|
||||
|
|
||||
note: lint level defined here
|
||||
--> $DIR/intra-link-span-ice-55723.rs:3:9
|
||||
--> $DIR/intra-link-span-ice-55723.rs:1:9
|
||||
|
|
||||
LL | #![deny(intra_doc_link_resolution_failure)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -1,4 +1,3 @@
|
||||
// ignore-tidy-linelength
|
||||
// compile-flags: --document-private-items
|
||||
|
||||
// @has 'empty_mod_private/index.html' '//a[@href="foo/index.html"]' 'foo'
|
||||
|
@ -1,5 +1,3 @@
|
||||
// ignore-tidy-linelength
|
||||
|
||||
// compile-flags:-Z unstable-options --extern-html-root-url core=https://example.com/core/0.1.0
|
||||
|
||||
// @has extern_html_root_url/index.html
|
||||
|
@ -1,5 +1,3 @@
|
||||
// ignore-tidy-linelength
|
||||
|
||||
#![crate_name = "foo"]
|
||||
|
||||
// @has foo/struct.Foo.html
|
||||
|
@ -1,4 +1,3 @@
|
||||
// ignore-tidy-linelength
|
||||
// compile-flags: --document-private-items
|
||||
|
||||
#![crate_name = "foo"]
|
||||
|
@ -1,5 +1,5 @@
|
||||
error[E0502]: cannot borrow `x` as immutable because it is also borrowed as mutable
|
||||
--> $DIR/two-phase-activation-sharing-interference.rs:32:15
|
||||
--> $DIR/two-phase-activation-sharing-interference.rs:30:15
|
||||
|
|
||||
LL | let y = &mut x;
|
||||
| ------ mutable borrow occurs here
|
||||
@ -10,7 +10,7 @@ LL | *y += 1;
|
||||
| ------- mutable borrow later used here
|
||||
|
||||
error[E0502]: cannot borrow `x` as immutable because it is also borrowed as mutable
|
||||
--> $DIR/two-phase-activation-sharing-interference.rs:40:13
|
||||
--> $DIR/two-phase-activation-sharing-interference.rs:38:13
|
||||
|
|
||||
LL | let y = &mut x;
|
||||
| ------ mutable borrow occurs here
|
||||
@ -21,7 +21,7 @@ LL | *y += 1;
|
||||
| ------- mutable borrow later used here
|
||||
|
||||
error[E0502]: cannot borrow `x` as immutable because it is also borrowed as mutable
|
||||
--> $DIR/two-phase-activation-sharing-interference.rs:51:13
|
||||
--> $DIR/two-phase-activation-sharing-interference.rs:49:13
|
||||
|
|
||||
LL | let y = &mut x;
|
||||
| ------ mutable borrow occurs here
|
||||
@ -32,7 +32,7 @@ LL | *y += 1;
|
||||
| ------- mutable borrow later used here
|
||||
|
||||
error[E0502]: cannot borrow `x` as immutable because it is also borrowed as mutable
|
||||
--> $DIR/two-phase-activation-sharing-interference.rs:62:14
|
||||
--> $DIR/two-phase-activation-sharing-interference.rs:60:14
|
||||
|
|
||||
LL | let y = &mut x;
|
||||
| ------ mutable borrow occurs here
|
||||
|
@ -1,5 +1,3 @@
|
||||
// ignore-tidy-linelength
|
||||
|
||||
// revisions: nll_target
|
||||
|
||||
// The following revisions are disabled due to missing support from two-phase beyond autorefs
|
||||
|
@ -1,5 +1,3 @@
|
||||
// ignore-tidy-linelength
|
||||
|
||||
#![feature(const_indexing)]
|
||||
|
||||
const FOO: [usize; 3] = [1, 2, 3];
|
||||
|
@ -1,5 +1,5 @@
|
||||
error[E0080]: evaluation of constant value failed
|
||||
--> $DIR/const-array-oob.rs:8:19
|
||||
--> $DIR/const-array-oob.rs:6:19
|
||||
|
|
||||
LL | const BLUB: [u32; FOO[4]] = [5, 6];
|
||||
| ^^^^^^ index out of bounds: the len is 3 but the index is 4
|
||||
|
@ -1,5 +1,3 @@
|
||||
// ignore-tidy-linelength
|
||||
|
||||
// run-pass
|
||||
|
||||
#![deny(deprecated_in_future)]
|
||||
|
@ -1,5 +1,5 @@
|
||||
warning: use of deprecated item 'deprecated_future': text
|
||||
--> $DIR/deprecation-in-future.rs:11:5
|
||||
--> $DIR/deprecation-in-future.rs:9:5
|
||||
|
|
||||
LL | deprecated_future(); // ok; deprecated_in_future only applies to rustc_deprecated
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
|
@ -1,5 +1,3 @@
|
||||
// ignore-tidy-linelength
|
||||
|
||||
#[derive(Eqr)]
|
||||
//~^ ERROR cannot find derive macro `Eqr` in this scope
|
||||
struct Foo;
|
||||
|
@ -1,5 +1,5 @@
|
||||
error: cannot find derive macro `Eqr` in this scope
|
||||
--> $DIR/deriving-meta-unknown-trait.rs:3:10
|
||||
--> $DIR/deriving-meta-unknown-trait.rs:1:10
|
||||
|
|
||||
LL | #[derive(Eqr)]
|
||||
| ^^^ help: try: `Eq`
|
||||
|
@ -1,5 +1,3 @@
|
||||
// ignore-tidy-linelength
|
||||
|
||||
// Issue 23030: Detect overflowing discriminant
|
||||
//
|
||||
// Check that we detect the overflow even if enum is not used.
|
||||
|
@ -1,5 +1,5 @@
|
||||
error[E0370]: enum discriminant overflowed
|
||||
--> $DIR/discrim-overflow-2.rs:17:9
|
||||
--> $DIR/discrim-overflow-2.rs:15:9
|
||||
|
|
||||
LL | OhNo,
|
||||
| ^^^^ overflowed on value after 127
|
||||
@ -7,7 +7,7 @@ LL | OhNo,
|
||||
= note: explicitly set `OhNo = -128` if that is desired outcome
|
||||
|
||||
error[E0370]: enum discriminant overflowed
|
||||
--> $DIR/discrim-overflow-2.rs:26:9
|
||||
--> $DIR/discrim-overflow-2.rs:24:9
|
||||
|
|
||||
LL | OhNo,
|
||||
| ^^^^ overflowed on value after 255
|
||||
@ -15,7 +15,7 @@ LL | OhNo,
|
||||
= note: explicitly set `OhNo = 0` if that is desired outcome
|
||||
|
||||
error[E0370]: enum discriminant overflowed
|
||||
--> $DIR/discrim-overflow-2.rs:35:9
|
||||
--> $DIR/discrim-overflow-2.rs:33:9
|
||||
|
|
||||
LL | OhNo,
|
||||
| ^^^^ overflowed on value after 32767
|
||||
@ -23,7 +23,7 @@ LL | OhNo,
|
||||
= note: explicitly set `OhNo = -32768` if that is desired outcome
|
||||
|
||||
error[E0370]: enum discriminant overflowed
|
||||
--> $DIR/discrim-overflow-2.rs:44:9
|
||||
--> $DIR/discrim-overflow-2.rs:42:9
|
||||
|
|
||||
LL | OhNo,
|
||||
| ^^^^ overflowed on value after 65535
|
||||
@ -31,7 +31,7 @@ LL | OhNo,
|
||||
= note: explicitly set `OhNo = 0` if that is desired outcome
|
||||
|
||||
error[E0370]: enum discriminant overflowed
|
||||
--> $DIR/discrim-overflow-2.rs:53:9
|
||||
--> $DIR/discrim-overflow-2.rs:51:9
|
||||
|
|
||||
LL | OhNo,
|
||||
| ^^^^ overflowed on value after 2147483647
|
||||
@ -39,7 +39,7 @@ LL | OhNo,
|
||||
= note: explicitly set `OhNo = -2147483648` if that is desired outcome
|
||||
|
||||
error[E0370]: enum discriminant overflowed
|
||||
--> $DIR/discrim-overflow-2.rs:62:9
|
||||
--> $DIR/discrim-overflow-2.rs:60:9
|
||||
|
|
||||
LL | OhNo,
|
||||
| ^^^^ overflowed on value after 4294967295
|
||||
@ -47,7 +47,7 @@ LL | OhNo,
|
||||
= note: explicitly set `OhNo = 0` if that is desired outcome
|
||||
|
||||
error[E0370]: enum discriminant overflowed
|
||||
--> $DIR/discrim-overflow-2.rs:71:9
|
||||
--> $DIR/discrim-overflow-2.rs:69:9
|
||||
|
|
||||
LL | OhNo,
|
||||
| ^^^^ overflowed on value after 9223372036854775807
|
||||
@ -55,7 +55,7 @@ LL | OhNo,
|
||||
= note: explicitly set `OhNo = -9223372036854775808` if that is desired outcome
|
||||
|
||||
error[E0370]: enum discriminant overflowed
|
||||
--> $DIR/discrim-overflow-2.rs:80:9
|
||||
--> $DIR/discrim-overflow-2.rs:78:9
|
||||
|
|
||||
LL | OhNo,
|
||||
| ^^^^ overflowed on value after 18446744073709551615
|
||||
|
@ -1,5 +1,3 @@
|
||||
// ignore-tidy-linelength
|
||||
|
||||
// Issue 23030: Detect overflowing discriminant
|
||||
|
||||
// See also run-pass/discrim-explicit-23030.rs where the suggested
|
||||
|
@ -1,5 +1,5 @@
|
||||
error[E0370]: enum discriminant overflowed
|
||||
--> $DIR/discrim-overflow.rs:15:9
|
||||
--> $DIR/discrim-overflow.rs:13:9
|
||||
|
|
||||
LL | OhNo,
|
||||
| ^^^^ overflowed on value after 127
|
||||
@ -7,7 +7,7 @@ LL | OhNo,
|
||||
= note: explicitly set `OhNo = -128` if that is desired outcome
|
||||
|
||||
error[E0370]: enum discriminant overflowed
|
||||
--> $DIR/discrim-overflow.rs:26:9
|
||||
--> $DIR/discrim-overflow.rs:24:9
|
||||
|
|
||||
LL | OhNo,
|
||||
| ^^^^ overflowed on value after 255
|
||||
@ -15,7 +15,7 @@ LL | OhNo,
|
||||
= note: explicitly set `OhNo = 0` if that is desired outcome
|
||||
|
||||
error[E0370]: enum discriminant overflowed
|
||||
--> $DIR/discrim-overflow.rs:37:9
|
||||
--> $DIR/discrim-overflow.rs:35:9
|
||||
|
|
||||
LL | OhNo,
|
||||
| ^^^^ overflowed on value after 32767
|
||||
@ -23,7 +23,7 @@ LL | OhNo,
|
||||
= note: explicitly set `OhNo = -32768` if that is desired outcome
|
||||
|
||||
error[E0370]: enum discriminant overflowed
|
||||
--> $DIR/discrim-overflow.rs:48:9
|
||||
--> $DIR/discrim-overflow.rs:46:9
|
||||
|
|
||||
LL | OhNo,
|
||||
| ^^^^ overflowed on value after 65535
|
||||
@ -31,7 +31,7 @@ LL | OhNo,
|
||||
= note: explicitly set `OhNo = 0` if that is desired outcome
|
||||
|
||||
error[E0370]: enum discriminant overflowed
|
||||
--> $DIR/discrim-overflow.rs:60:9
|
||||
--> $DIR/discrim-overflow.rs:58:9
|
||||
|
|
||||
LL | OhNo,
|
||||
| ^^^^ overflowed on value after 2147483647
|
||||
@ -39,7 +39,7 @@ LL | OhNo,
|
||||
= note: explicitly set `OhNo = -2147483648` if that is desired outcome
|
||||
|
||||
error[E0370]: enum discriminant overflowed
|
||||
--> $DIR/discrim-overflow.rs:72:9
|
||||
--> $DIR/discrim-overflow.rs:70:9
|
||||
|
|
||||
LL | OhNo,
|
||||
| ^^^^ overflowed on value after 4294967295
|
||||
@ -47,7 +47,7 @@ LL | OhNo,
|
||||
= note: explicitly set `OhNo = 0` if that is desired outcome
|
||||
|
||||
error[E0370]: enum discriminant overflowed
|
||||
--> $DIR/discrim-overflow.rs:84:9
|
||||
--> $DIR/discrim-overflow.rs:82:9
|
||||
|
|
||||
LL | OhNo,
|
||||
| ^^^^ overflowed on value after 9223372036854775807
|
||||
@ -55,7 +55,7 @@ LL | OhNo,
|
||||
= note: explicitly set `OhNo = -9223372036854775808` if that is desired outcome
|
||||
|
||||
error[E0370]: enum discriminant overflowed
|
||||
--> $DIR/discrim-overflow.rs:96:9
|
||||
--> $DIR/discrim-overflow.rs:94:9
|
||||
|
|
||||
LL | OhNo,
|
||||
| ^^^^ overflowed on value after 18446744073709551615
|
||||
|
@ -1,4 +1,3 @@
|
||||
// ignore-tidy-linelength
|
||||
// edition:2015
|
||||
|
||||
// tests that editions work with the tyvar warning-turned-error
|
||||
|
@ -1,11 +1,11 @@
|
||||
error: type annotations needed
|
||||
--> $DIR/edition-raw-pointer-method-2015.rs:10:15
|
||||
--> $DIR/edition-raw-pointer-method-2015.rs:9:15
|
||||
|
|
||||
LL | let _ = y.is_null();
|
||||
| ^^^^^^^
|
||||
|
|
||||
note: lint level defined here
|
||||
--> $DIR/edition-raw-pointer-method-2015.rs:6:8
|
||||
--> $DIR/edition-raw-pointer-method-2015.rs:5:8
|
||||
|
|
||||
LL | #[deny(warnings)]
|
||||
| ^^^^^^^^
|
||||
|
@ -1,4 +1,3 @@
|
||||
// ignore-tidy-linelength
|
||||
// edition:2018
|
||||
|
||||
// tests that editions work with the tyvar warning-turned-error
|
||||
|
@ -1,5 +1,5 @@
|
||||
error[E0699]: the type of this value must be known to call a method on a raw pointer on it
|
||||
--> $DIR/edition-raw-pointer-method-2018.rs:10:15
|
||||
--> $DIR/edition-raw-pointer-method-2018.rs:9:15
|
||||
|
|
||||
LL | let _ = y.is_null();
|
||||
| ^^^^^^^
|
||||
|
@ -1,5 +1,3 @@
|
||||
// ignore-tidy-linelength
|
||||
|
||||
#![feature(coerce_unsized)]
|
||||
use std::ops::CoerceUnsized;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
error[E0375]: implementing the trait `CoerceUnsized` requires multiple coercions
|
||||
--> $DIR/E0375.rs:12:12
|
||||
--> $DIR/E0375.rs:10:12
|
||||
|
|
||||
LL | impl<T, U> CoerceUnsized<Foo<U, T>> for Foo<T, U> {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^ requires multiple coercions
|
||||
|
@ -1,4 +1,3 @@
|
||||
// ignore-tidy-linelength
|
||||
#![crate_type = "lib"]
|
||||
|
||||
extern {
|
||||
|
@ -1,5 +1,5 @@
|
||||
error[E0658]: the `#[ffi_returns_twice]` attribute is an experimental feature
|
||||
--> $DIR/feature-gate-ffi_returns_twice.rs:5:5
|
||||
--> $DIR/feature-gate-ffi_returns_twice.rs:4:5
|
||||
|
|
||||
LL | #[ffi_returns_twice]
|
||||
| ^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -1,4 +1,3 @@
|
||||
// ignore-tidy-linelength
|
||||
#![feature(ffi_returns_twice)]
|
||||
#![crate_type = "lib"]
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
error[E0724]: `#[ffi_returns_twice]` may only be used on foreign functions
|
||||
--> $DIR/ffi_returns_twice.rs:5:1
|
||||
--> $DIR/ffi_returns_twice.rs:4:1
|
||||
|
|
||||
LL | #[ffi_returns_twice]
|
||||
| ^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -1,5 +1,3 @@
|
||||
// ignore-tidy-linelength
|
||||
|
||||
use std::cell::Cell;
|
||||
use std::rc::Rc;
|
||||
|
||||
|
@ -1,29 +1,29 @@
|
||||
error[E0391]: cycle detected when processing `cycle1::{{opaque}}#0`
|
||||
--> $DIR/auto-trait-leak.rs:14:16
|
||||
--> $DIR/auto-trait-leak.rs:12:16
|
||||
|
|
||||
LL | fn cycle1() -> impl Clone {
|
||||
| ^^^^^^^^^^
|
||||
|
|
||||
note: ...which requires processing `cycle1`...
|
||||
--> $DIR/auto-trait-leak.rs:14:1
|
||||
--> $DIR/auto-trait-leak.rs:12:1
|
||||
|
|
||||
LL | fn cycle1() -> impl Clone {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
= note: ...which requires evaluating trait selection obligation `impl std::clone::Clone: std::marker::Send`...
|
||||
note: ...which requires processing `cycle2::{{opaque}}#0`...
|
||||
--> $DIR/auto-trait-leak.rs:23:16
|
||||
--> $DIR/auto-trait-leak.rs:21:16
|
||||
|
|
||||
LL | fn cycle2() -> impl Clone {
|
||||
| ^^^^^^^^^^
|
||||
note: ...which requires processing `cycle2`...
|
||||
--> $DIR/auto-trait-leak.rs:23:1
|
||||
--> $DIR/auto-trait-leak.rs:21:1
|
||||
|
|
||||
LL | fn cycle2() -> impl Clone {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
= note: ...which requires evaluating trait selection obligation `impl std::clone::Clone: std::marker::Send`...
|
||||
= note: ...which again requires processing `cycle1::{{opaque}}#0`, completing the cycle
|
||||
note: cycle used when checking item types in top-level module
|
||||
--> $DIR/auto-trait-leak.rs:3:1
|
||||
--> $DIR/auto-trait-leak.rs:1:1
|
||||
|
|
||||
LL | / use std::cell::Cell;
|
||||
LL | | use std::rc::Rc;
|
||||
@ -35,30 +35,30 @@ LL | | }
|
||||
| |_^
|
||||
|
||||
error[E0391]: cycle detected when processing `cycle1::{{opaque}}#0`
|
||||
--> $DIR/auto-trait-leak.rs:14:16
|
||||
--> $DIR/auto-trait-leak.rs:12:16
|
||||
|
|
||||
LL | fn cycle1() -> impl Clone {
|
||||
| ^^^^^^^^^^
|
||||
|
|
||||
note: ...which requires processing `cycle1`...
|
||||
--> $DIR/auto-trait-leak.rs:14:1
|
||||
--> $DIR/auto-trait-leak.rs:12:1
|
||||
|
|
||||
LL | fn cycle1() -> impl Clone {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
= note: ...which requires evaluating trait selection obligation `impl std::clone::Clone: std::marker::Send`...
|
||||
note: ...which requires processing `cycle2::{{opaque}}#0`...
|
||||
--> $DIR/auto-trait-leak.rs:23:16
|
||||
--> $DIR/auto-trait-leak.rs:21:16
|
||||
|
|
||||
LL | fn cycle2() -> impl Clone {
|
||||
| ^^^^^^^^^^
|
||||
note: ...which requires processing `cycle2`...
|
||||
--> $DIR/auto-trait-leak.rs:23:1
|
||||
--> $DIR/auto-trait-leak.rs:21:1
|
||||
|
|
||||
LL | fn cycle2() -> impl Clone {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
= note: ...which again requires processing `cycle1::{{opaque}}#0`, completing the cycle
|
||||
note: cycle used when checking item types in top-level module
|
||||
--> $DIR/auto-trait-leak.rs:3:1
|
||||
--> $DIR/auto-trait-leak.rs:1:1
|
||||
|
|
||||
LL | / use std::cell::Cell;
|
||||
LL | | use std::rc::Rc;
|
||||
@ -70,7 +70,7 @@ LL | | }
|
||||
| |_^
|
||||
|
||||
error[E0277]: `std::rc::Rc<std::string::String>` cannot be sent between threads safely
|
||||
--> $DIR/auto-trait-leak.rs:17:5
|
||||
--> $DIR/auto-trait-leak.rs:15:5
|
||||
|
|
||||
LL | send(cycle2().clone());
|
||||
| ^^^^ `std::rc::Rc<std::string::String>` cannot be sent between threads safely
|
||||
@ -78,7 +78,7 @@ LL | send(cycle2().clone());
|
||||
= help: within `impl std::clone::Clone`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<std::string::String>`
|
||||
= note: required because it appears within the type `impl std::clone::Clone`
|
||||
note: required by `send`
|
||||
--> $DIR/auto-trait-leak.rs:6:1
|
||||
--> $DIR/auto-trait-leak.rs:4:1
|
||||
|
|
||||
LL | fn send<T: Send>(_: T) {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -1,5 +1,3 @@
|
||||
// ignore-tidy-linelength
|
||||
|
||||
use std::cell::Cell;
|
||||
use std::rc::Rc;
|
||||
|
||||
|
@ -1,29 +1,29 @@
|
||||
error[E0277]: `std::rc::Rc<std::cell::Cell<i32>>` cannot be sent between threads safely
|
||||
--> $DIR/auto-trait-leak2.rs:15:5
|
||||
--> $DIR/auto-trait-leak2.rs:13:5
|
||||
|
|
||||
LL | send(before());
|
||||
| ^^^^ `std::rc::Rc<std::cell::Cell<i32>>` cannot be sent between threads safely
|
||||
|
|
||||
= help: within `impl std::ops::Fn<(i32,)>`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<std::cell::Cell<i32>>`
|
||||
= note: required because it appears within the type `[closure@$DIR/auto-trait-leak2.rs:9:5: 9:22 p:std::rc::Rc<std::cell::Cell<i32>>]`
|
||||
= note: required because it appears within the type `[closure@$DIR/auto-trait-leak2.rs:7:5: 7:22 p:std::rc::Rc<std::cell::Cell<i32>>]`
|
||||
= note: required because it appears within the type `impl std::ops::Fn<(i32,)>`
|
||||
note: required by `send`
|
||||
--> $DIR/auto-trait-leak2.rs:12:1
|
||||
--> $DIR/auto-trait-leak2.rs:10:1
|
||||
|
|
||||
LL | fn send<T: Send>(_: T) {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0277]: `std::rc::Rc<std::cell::Cell<i32>>` cannot be sent between threads safely
|
||||
--> $DIR/auto-trait-leak2.rs:18:5
|
||||
--> $DIR/auto-trait-leak2.rs:16:5
|
||||
|
|
||||
LL | send(after());
|
||||
| ^^^^ `std::rc::Rc<std::cell::Cell<i32>>` cannot be sent between threads safely
|
||||
|
|
||||
= help: within `impl std::ops::Fn<(i32,)>`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<std::cell::Cell<i32>>`
|
||||
= note: required because it appears within the type `[closure@$DIR/auto-trait-leak2.rs:26:5: 26:22 p:std::rc::Rc<std::cell::Cell<i32>>]`
|
||||
= note: required because it appears within the type `[closure@$DIR/auto-trait-leak2.rs:24:5: 24:22 p:std::rc::Rc<std::cell::Cell<i32>>]`
|
||||
= note: required because it appears within the type `impl std::ops::Fn<(i32,)>`
|
||||
note: required by `send`
|
||||
--> $DIR/auto-trait-leak2.rs:12:1
|
||||
--> $DIR/auto-trait-leak2.rs:10:1
|
||||
|
|
||||
LL | fn send<T: Send>(_: T) {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -1,6 +1,4 @@
|
||||
// issue #21405
|
||||
// ignore-tidy-linelength
|
||||
|
||||
struct Foo;
|
||||
|
||||
fn foo<F>(f: F) where F: FnMut(Foo) {}
|
||||
|
@ -1,5 +1,5 @@
|
||||
error[E0599]: no method named `is_empty` found for type `Foo` in the current scope
|
||||
--> $DIR/method-suggestion-no-duplication.rs:9:15
|
||||
--> $DIR/method-suggestion-no-duplication.rs:7:15
|
||||
|
|
||||
LL | struct Foo;
|
||||
| ----------- method `is_empty` not found for this
|
||||
|
@ -1,5 +1,3 @@
|
||||
// ignore-tidy-linelength
|
||||
|
||||
mod auxiliary {
|
||||
mod foo;
|
||||
}
|
||||
|
@ -1,5 +1,3 @@
|
||||
// ignore-tidy-linelength
|
||||
|
||||
use std::ops::Add;
|
||||
|
||||
fn main() {
|
||||
|
@ -1,5 +1,5 @@
|
||||
error[E0393]: the type parameter `Rhs` must be explicitly specified
|
||||
--> $DIR/issue-21950.rs:7:14
|
||||
--> $DIR/issue-21950.rs:5:14
|
||||
|
|
||||
LL | &Add;
|
||||
| ^^^ missing reference to `Rhs`
|
||||
@ -7,7 +7,7 @@ LL | &Add;
|
||||
= note: because of the default `Self` reference, type parameters must be specified on object types
|
||||
|
||||
error[E0191]: the value of the associated type `Output` (from the trait `std::ops::Add`) must be specified
|
||||
--> $DIR/issue-21950.rs:7:14
|
||||
--> $DIR/issue-21950.rs:5:14
|
||||
|
|
||||
LL | &Add;
|
||||
| ^^^ associated type `Output` must be specified
|
||||
|
@ -1,5 +1,3 @@
|
||||
// ignore-tidy-linelength
|
||||
|
||||
trait A<T=Self> {}
|
||||
|
||||
fn f(a: &A) {}
|
||||
|
@ -1,5 +1,5 @@
|
||||
error[E0393]: the type parameter `T` must be explicitly specified
|
||||
--> $DIR/issue-22370.rs:5:10
|
||||
--> $DIR/issue-22370.rs:3:10
|
||||
|
|
||||
LL | fn f(a: &A) {}
|
||||
| ^ missing reference to `T`
|
||||
|
@ -1,5 +1,3 @@
|
||||
// ignore-tidy-linelength
|
||||
|
||||
use std::ops::{Add, Sub};
|
||||
|
||||
type Test = Add +
|
||||
|
@ -1,5 +1,5 @@
|
||||
error[E0393]: the type parameter `Rhs` must be explicitly specified
|
||||
--> $DIR/issue-22560.rs:5:13
|
||||
--> $DIR/issue-22560.rs:3:13
|
||||
|
|
||||
LL | type Test = Add +
|
||||
| ^^^ missing reference to `Rhs`
|
||||
@ -7,7 +7,7 @@ LL | type Test = Add +
|
||||
= note: because of the default `Self` reference, type parameters must be specified on object types
|
||||
|
||||
error[E0393]: the type parameter `Rhs` must be explicitly specified
|
||||
--> $DIR/issue-22560.rs:8:13
|
||||
--> $DIR/issue-22560.rs:6:13
|
||||
|
|
||||
LL | Sub;
|
||||
| ^^^ missing reference to `Rhs`
|
||||
@ -15,13 +15,13 @@ LL | Sub;
|
||||
= note: because of the default `Self` reference, type parameters must be specified on object types
|
||||
|
||||
error[E0225]: only auto traits can be used as additional traits in a trait object
|
||||
--> $DIR/issue-22560.rs:8:13
|
||||
--> $DIR/issue-22560.rs:6:13
|
||||
|
|
||||
LL | Sub;
|
||||
| ^^^ non-auto additional trait
|
||||
|
||||
error[E0191]: the value of the associated type `Output` (from the trait `std::ops::Add`) must be specified
|
||||
--> $DIR/issue-22560.rs:5:13
|
||||
--> $DIR/issue-22560.rs:3:13
|
||||
|
|
||||
LL | type Test = Add +
|
||||
| _____________^
|
||||
|
@ -1,6 +1,4 @@
|
||||
// ignore-tidy-linelength
|
||||
|
||||
//~^^ ERROR
|
||||
//~ ERROR
|
||||
|
||||
#![feature(optin_builtin_traits)]
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
error[E0380]: auto traits cannot have methods or associated items
|
||||
--> $DIR/issue-23080-2.rs:7:1
|
||||
--> $DIR/issue-23080-2.rs:5:1
|
||||
|
|
||||
LL | / unsafe auto trait Trait {
|
||||
LL | |
|
||||
|
@ -1,5 +1,3 @@
|
||||
// ignore-tidy-linelength
|
||||
|
||||
#![feature(optin_builtin_traits)]
|
||||
|
||||
unsafe auto trait Trait {
|
||||
|
@ -1,5 +1,5 @@
|
||||
error[E0380]: auto traits cannot have methods or associated items
|
||||
--> $DIR/issue-23080.rs:5:1
|
||||
--> $DIR/issue-23080.rs:3:1
|
||||
|
|
||||
LL | / unsafe auto trait Trait {
|
||||
LL | |
|
||||
|
@ -1,5 +1,3 @@
|
||||
// ignore-tidy-linelength
|
||||
|
||||
pub struct Struct;
|
||||
|
||||
impl Struct {
|
||||
|
@ -1,5 +1,5 @@
|
||||
error[E0277]: the size for values of type `(dyn std::ops::Fn() + 'static)` cannot be known at compilation time
|
||||
--> $DIR/issue-23281.rs:6:5
|
||||
--> $DIR/issue-23281.rs:4:5
|
||||
|
|
||||
LL | pub fn function(funs: Vec<Fn() -> ()>) {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
|
||||
|
@ -1,5 +1,3 @@
|
||||
// ignore-tidy-linelength
|
||||
|
||||
fn foo() -> i32 {
|
||||
42
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
error[E0369]: binary operation `>` cannot be applied to type `fn() -> i32 {foo}`
|
||||
--> $DIR/issue-59488.rs:16:9
|
||||
--> $DIR/issue-59488.rs:14:9
|
||||
|
|
||||
LL | foo > 12;
|
||||
| --- ^ -- {integer}
|
||||
@ -8,7 +8,7 @@ LL | foo > 12;
|
||||
| help: you might have forgotten to call this function: `foo()`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/issue-59488.rs:16:11
|
||||
--> $DIR/issue-59488.rs:14:11
|
||||
|
|
||||
LL | foo > 12;
|
||||
| ^^ expected fn item, found integer
|
||||
@ -17,7 +17,7 @@ LL | foo > 12;
|
||||
found type `i32`
|
||||
|
||||
error[E0369]: binary operation `>` cannot be applied to type `fn(i64) -> i64 {bar}`
|
||||
--> $DIR/issue-59488.rs:20:9
|
||||
--> $DIR/issue-59488.rs:18:9
|
||||
|
|
||||
LL | bar > 13;
|
||||
| --- ^ -- {integer}
|
||||
@ -26,7 +26,7 @@ LL | bar > 13;
|
||||
| help: you might have forgotten to call this function: `bar( /* arguments */ )`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/issue-59488.rs:20:11
|
||||
--> $DIR/issue-59488.rs:18:11
|
||||
|
|
||||
LL | bar > 13;
|
||||
| ^^ expected fn item, found integer
|
||||
@ -35,7 +35,7 @@ LL | bar > 13;
|
||||
found type `i64`
|
||||
|
||||
error[E0369]: binary operation `>` cannot be applied to type `fn() -> i32 {foo}`
|
||||
--> $DIR/issue-59488.rs:24:9
|
||||
--> $DIR/issue-59488.rs:22:9
|
||||
|
|
||||
LL | foo > foo;
|
||||
| --- ^ --- fn() -> i32 {foo}
|
||||
@ -51,7 +51,7 @@ LL | foo > foo();
|
||||
| ^^^^^
|
||||
|
||||
error[E0369]: binary operation `>` cannot be applied to type `fn() -> i32 {foo}`
|
||||
--> $DIR/issue-59488.rs:27:9
|
||||
--> $DIR/issue-59488.rs:25:9
|
||||
|
|
||||
LL | foo > bar;
|
||||
| --- ^ --- fn(i64) -> i64 {bar}
|
||||
@ -61,7 +61,7 @@ LL | foo > bar;
|
||||
= note: an implementation of `std::cmp::PartialOrd` might be missing for `fn() -> i32 {foo}`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/issue-59488.rs:27:11
|
||||
--> $DIR/issue-59488.rs:25:11
|
||||
|
|
||||
LL | foo > bar;
|
||||
| ^^^ expected fn item, found a different fn item
|
||||
@ -70,7 +70,7 @@ LL | foo > bar;
|
||||
found type `fn(i64) -> i64 {bar}`
|
||||
|
||||
error[E0369]: binary operation `==` cannot be applied to type `fn(usize) -> Foo {Foo::Bar}`
|
||||
--> $DIR/issue-59488.rs:32:5
|
||||
--> $DIR/issue-59488.rs:30:5
|
||||
|
|
||||
LL | assert_eq!(Foo::Bar, i);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -82,7 +82,7 @@ LL | assert_eq!(Foo::Bar, i);
|
||||
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
|
||||
|
||||
error[E0277]: `fn(usize) -> Foo {Foo::Bar}` doesn't implement `std::fmt::Debug`
|
||||
--> $DIR/issue-59488.rs:32:5
|
||||
--> $DIR/issue-59488.rs:30:5
|
||||
|
|
||||
LL | assert_eq!(Foo::Bar, i);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^ `fn(usize) -> Foo {Foo::Bar}` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug`
|
||||
@ -93,7 +93,7 @@ LL | assert_eq!(Foo::Bar, i);
|
||||
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
|
||||
|
||||
error[E0277]: `fn(usize) -> Foo {Foo::Bar}` doesn't implement `std::fmt::Debug`
|
||||
--> $DIR/issue-59488.rs:32:5
|
||||
--> $DIR/issue-59488.rs:30:5
|
||||
|
|
||||
LL | assert_eq!(Foo::Bar, i);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^ `fn(usize) -> Foo {Foo::Bar}` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug`
|
||||
|
@ -1,5 +1,3 @@
|
||||
// ignore-tidy-linelength
|
||||
|
||||
trait Foo {}
|
||||
|
||||
impl Foo for dyn Send {}
|
||||
|
@ -1,5 +1,5 @@
|
||||
error: conflicting implementations of trait `Foo` for type `(dyn std::marker::Send + 'static)`: (E0119)
|
||||
--> $DIR/lint-incoherent-auto-trait-objects.rs:7:1
|
||||
--> $DIR/lint-incoherent-auto-trait-objects.rs:5:1
|
||||
|
|
||||
LL | impl Foo for dyn Send {}
|
||||
| --------------------- first implementation here
|
||||
@ -12,7 +12,7 @@ LL | impl Foo for dyn Send + Send {}
|
||||
= note: for more information, see issue #56484 <https://github.com/rust-lang/rust/issues/56484>
|
||||
|
||||
error: conflicting implementations of trait `Foo` for type `(dyn std::marker::Send + std::marker::Sync + 'static)`: (E0119)
|
||||
--> $DIR/lint-incoherent-auto-trait-objects.rs:13:1
|
||||
--> $DIR/lint-incoherent-auto-trait-objects.rs:11:1
|
||||
|
|
||||
LL | impl Foo for dyn Send + Sync {}
|
||||
| ---------------------------- first implementation here
|
||||
@ -24,7 +24,7 @@ LL | impl Foo for dyn Sync + Send {}
|
||||
= note: for more information, see issue #56484 <https://github.com/rust-lang/rust/issues/56484>
|
||||
|
||||
error: conflicting implementations of trait `Foo` for type `(dyn std::marker::Send + std::marker::Sync + 'static)`: (E0119)
|
||||
--> $DIR/lint-incoherent-auto-trait-objects.rs:17:1
|
||||
--> $DIR/lint-incoherent-auto-trait-objects.rs:15:1
|
||||
|
|
||||
LL | impl Foo for dyn Sync + Send {}
|
||||
| ---------------------------- first implementation here
|
||||
|
@ -1,5 +1,3 @@
|
||||
// ignore-tidy-linelength
|
||||
|
||||
#![feature(box_patterns)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
error[E0507]: cannot move out of borrowed content
|
||||
--> $DIR/moves-based-on-type-block-bad.rs:24:19
|
||||
--> $DIR/moves-based-on-type-block-bad.rs:22:19
|
||||
|
|
||||
LL | match hellothere.x {
|
||||
| ^^^^^^^^^^^^
|
||||
@ -11,7 +11,7 @@ LL | box E::Bar(x) => println!("{}", x.to_string()),
|
||||
| - data moved here
|
||||
|
|
||||
note: move occurs because `x` has type `std::boxed::Box<isize>`, which does not implement the `Copy` trait
|
||||
--> $DIR/moves-based-on-type-block-bad.rs:27:28
|
||||
--> $DIR/moves-based-on-type-block-bad.rs:25:28
|
||||
|
|
||||
LL | box E::Bar(x) => println!("{}", x.to_string()),
|
||||
| ^
|
||||
|
@ -1,5 +1,3 @@
|
||||
// ignore-tidy-linelength
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
pub struct Bar;
|
||||
|
@ -1,7 +1,4 @@
|
||||
// Test new Index error message for slices
|
||||
// ignore-tidy-linelength
|
||||
|
||||
|
||||
|
||||
use std::ops::Index;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
error[E0277]: the type `[i32]` cannot be indexed by `i32`
|
||||
--> $DIR/slice-index.rs:11:5
|
||||
--> $DIR/slice-index.rs:8:5
|
||||
|
|
||||
LL | x[1i32];
|
||||
| ^^^^^^^ slice indices are of type `usize` or ranges of `usize`
|
||||
@ -8,7 +8,7 @@ LL | x[1i32];
|
||||
= note: required because of the requirements on the impl of `std::ops::Index<i32>` for `[i32]`
|
||||
|
||||
error[E0277]: the type `[i32]` cannot be indexed by `std::ops::RangeTo<i32>`
|
||||
--> $DIR/slice-index.rs:12:5
|
||||
--> $DIR/slice-index.rs:9:5
|
||||
|
|
||||
LL | x[..1i32];
|
||||
| ^^^^^^^^^ slice indices are of type `usize` or ranges of `usize`
|
||||
|
@ -1,8 +1,5 @@
|
||||
// compile-flags: -Z continue-parse-after-error
|
||||
|
||||
|
||||
// ignore-tidy-tab
|
||||
|
||||
static FOO: &'static [u8] = b"\f"; //~ ERROR unknown byte escape
|
||||
|
||||
pub fn main() {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user