Skip to content

Commit 24c0ac1

Browse files
committed
Remove #[macro_use] std/core from tests
1 parent 114947e commit 24c0ac1

File tree

49 files changed

+2
-48
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+2
-48
lines changed

library/alloctests/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@
6262

6363
// Allow testing this library
6464
extern crate alloc as realalloc;
65-
#[macro_use]
6665
extern crate std;
6766
#[cfg(test)]
6867
extern crate test;

src/tools/rust-analyzer/crates/ide-diagnostics/src/handlers/unresolved_macro_call.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ macro_rules! panic {
9494
}
9595
9696
//- /lib.rs crate:foo deps:core
97-
#[macro_use]
9897
extern crate core;
9998
10099
fn foo() {

tests/pretty/asm.pp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#![no_std]
33
#[prelude_import]
44
use ::std::prelude::rust_2015::*;
5-
#[macro_use]
65
extern crate std;
76
//@ pretty-mode:expanded
87
//@ pp-exact:asm.pp

tests/pretty/autodiff_forward.pp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#![feature(autodiff)]
66
#[prelude_import]
77
use ::std::prelude::rust_2015::*;
8-
#[macro_use]
98
extern crate std;
109
//@ pretty-mode:expanded
1110
//@ pretty-compare-only

tests/pretty/autodiff_reverse.pp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#![feature(autodiff)]
66
#[prelude_import]
77
use ::std::prelude::rust_2015::*;
8-
#[macro_use]
98
extern crate std;
109
//@ pretty-mode:expanded
1110
//@ pretty-compare-only

tests/pretty/cast-lt.pp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#![no_std]
33
#[prelude_import]
44
use ::std::prelude::rust_2015::*;
5-
#[macro_use]
65
extern crate std;
76
//@ pretty-compare-only
87
//@ pretty-mode:expanded

tests/pretty/dollar-crate.pp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#![no_std]
33
#[prelude_import]
44
use ::std::prelude::rust_2015::*;
5-
#[macro_use]
65
extern crate std;
76
//@ pretty-compare-only
87
//@ pretty-mode:expanded

tests/pretty/expanded-and-path-remap-80832.pp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#![no_std]
33
#[prelude_import]
44
use ::std::prelude::rust_2015::*;
5-
#[macro_use]
65
extern crate std;
76
// Test for issue 80832
87
//

tests/pretty/format-args-str-escape.pp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#![no_std]
33
#[prelude_import]
44
use ::std::prelude::rust_2015::*;
5-
#[macro_use]
65
extern crate std;
76
//@ pretty-compare-only
87
//@ pretty-mode:expanded

tests/pretty/hir-fn-params.pp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#[prelude_import]
22
use ::std::prelude::rust_2015::*;
3-
#[macro_use]
43
extern crate std;
54
//@ pretty-compare-only
65
//@ pretty-mode:hir

tests/pretty/hir-fn-variadic.pp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#![feature(c_variadic)]
66
#[prelude_import]
77
use ::std::prelude::rust_2015::*;
8-
#[macro_use]
98
extern crate std;
109

1110
extern "C" {

tests/pretty/hir-lifetimes.pp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
#![allow(unused)]
88
#[prelude_import]
99
use ::std::prelude::rust_2015::*;
10-
#[macro_use]
1110
extern crate std;
1211

1312
struct Foo<'a> {

tests/pretty/hir-pretty-attr.pp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#[prelude_import]
22
use ::std::prelude::rust_2015::*;
3-
#[macro_use]
43
extern crate std;
54
//@ pretty-compare-only
65
//@ pretty-mode:hir

tests/pretty/hir-pretty-loop.pp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#[prelude_import]
22
use ::std::prelude::rust_2015::*;
3-
#[macro_use]
43
extern crate std;
54
//@ pretty-compare-only
65
//@ pretty-mode:hir

tests/pretty/hir-struct-expr.pp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#[prelude_import]
22
use ::std::prelude::rust_2015::*;
3-
#[macro_use]
43
extern crate std;
54
//@ pretty-compare-only
65
//@ pretty-mode:hir

tests/pretty/issue-12590-c.pp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#![no_std]
33
#[prelude_import]
44
use ::std::prelude::rust_2015::*;
5-
#[macro_use]
65
extern crate std;
76
//@ pretty-compare-only
87
//@ pretty-mode:expanded

tests/pretty/issue-4264.pp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#[prelude_import]
22
use ::std::prelude::rust_2015::*;
3-
#[macro_use]
43
extern crate std;
54
//@ pretty-compare-only
65
//@ pretty-mode:hir,typed

tests/pretty/issue-85089.pp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#[prelude_import]
22
use ::std::prelude::rust_2015::*;
3-
#[macro_use]
43
extern crate std;
54
// Test to print lifetimes on HIR pretty-printing.
65

tests/pretty/postfix-match/precedence.pp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
#![feature(postfix_match)]
44
#[prelude_import]
55
use ::std::prelude::rust_2015::*;
6-
#[macro_use]
76
extern crate std;
87

98
use std::ops::Add;

tests/pretty/tests-are-sorted.pp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#![no_std]
33
#[prelude_import]
44
use ::std::prelude::rust_2015::*;
5-
#[macro_use]
65
extern crate std;
76
//@ compile-flags: --crate-type=lib --test --remap-path-prefix={{src-base}}/=/the/src/ --remap-path-prefix={{src-base}}\=/the/src/
87
//@ pretty-compare-only

tests/ui/asm/unpretty-expanded.stdout

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#![no_std]
33
#[prelude_import]
44
use ::std::prelude::rust_2015::*;
5-
#[macro_use]
65
extern crate std;
76
//@ needs-asm-support
87
//@ check-pass

tests/ui/associated-type-bounds/return-type-notation/unpretty-parenthesized.stdout

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#![feature(prelude_import)]
22
#[prelude_import]
33
use std::prelude::rust_2021::*;
4-
#[macro_use]
54
extern crate std;
65
//@ edition: 2021
76
//@ compile-flags: -Zunpretty=expanded

tests/ui/codemap_tests/unicode.expanded.stdout

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#![no_std]
33
#[prelude_import]
44
use ::std::prelude::rust_2015::*;
5-
#[macro_use]
65
extern crate std;
76
//@ revisions: normal expanded
87
//@[expanded] check-pass

tests/ui/const-generics/defaults/pretty-printing-ast.stdout

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
#![crate_type = "lib"]
88
#[prelude_import]
99
use ::std::prelude::rust_2015::*;
10-
#[macro_use]
1110
extern crate std;
1211

1312
trait Foo<const KIND : bool = true> {}

tests/ui/deriving/built-in-proc-macro-scope.stdout

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
#![feature(derive_coerce_pointee)]
88
#[prelude_import]
99
use ::std::prelude::rust_2015::*;
10-
#[macro_use]
1110
extern crate std;
1211

1312
#[macro_use]

tests/ui/deriving/deriving-all-codegen.stdout

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
#![allow(deprecated)]
2020
#[prelude_import]
2121
use std::prelude::rust_2021::*;
22-
#[macro_use]
2322
extern crate std;
2423

2524
// Empty struct.

tests/ui/deriving/deriving-coerce-pointee-expanded.stdout

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#![feature(derive_coerce_pointee)]
66
#[prelude_import]
77
use ::std::prelude::rust_2015::*;
8-
#[macro_use]
98
extern crate std;
109
use std::marker::CoercePointee;
1110

tests/ui/deriving/proc-macro-attribute-mixing.stdout

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
#![feature(derive_coerce_pointee)]
1414
#[prelude_import]
1515
use ::std::prelude::rust_2015::*;
16-
#[macro_use]
1716
extern crate std;
1817

1918
#[macro_use]
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
use std::format_args_nl;
2+
13
fn main() {
24
format_args_nl!(""); //~ ERROR `format_args_nl` is only for internal language use
35
}

tests/ui/lint/dead-code/with-core-crate.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#![deny(dead_code)]
22
#![allow(unreachable_code)]
33

4-
#[macro_use]
54
extern crate core;
65

76
fn foo() { //~ ERROR function `foo` is never used

tests/ui/lint/rfc-2383-lint-reason/no_ice_for_partial_compiler_runs.stdout

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#![no_std]
33
#[prelude_import]
44
use ::std::prelude::rust_2015::*;
5-
#[macro_use]
65
extern crate std;
76
// This ensures that ICEs like rust#94953 don't happen
87
//@ check-pass

tests/ui/macros/genercs-in-path-with-prettry-hir.stdout

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#[prelude_import]
22
use ::std::prelude::rust_2015::*;
3-
#[macro_use]
43
extern crate std;
54
//@ compile-flags: -Zunpretty=hir
65

tests/ui/macros/rfc-2011-nicer-assert-messages/non-consuming-methods-have-optimized-codegen.stdout

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
#![feature(core_intrinsics, generic_assert)]
77
#[prelude_import]
88
use ::std::prelude::rust_2015::*;
9-
#[macro_use]
109
extern crate std;
1110

1211
fn arbitrary_consuming_method_for_demonstration_purposes() {

tests/ui/match/issue-82392.stdout

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#[prelude_import]
22
use ::std::prelude::rust_2015::*;
3-
#[macro_use]
43
extern crate std;
54
// https://github.com/rust-lang/rust/issues/82329
65
//@ compile-flags: -Zunpretty=hir,typed

tests/ui/proc-macro/meta-macro-hygiene.stdout

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ Respanned: TokenStream [Ident { ident: "$crate", span: $DIR/auxiliary/make-macro
1818
#![no_std /* 0#0 */]
1919
#[prelude_import /* 0#1 */]
2020
use core /* 0#1 */::prelude /* 0#1 */::rust_2018 /* 0#1 */::*;
21-
#[macro_use /* 0#1 */]
2221
extern crate core /* 0#1 */;
2322
// Don't load unnecessary hygiene information from std
2423
extern crate std /* 0#0 */;

tests/ui/proc-macro/nonterminal-token-hygiene.stdout

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ PRINT-BANG INPUT (DEBUG): TokenStream [
3737
#![no_std /* 0#0 */]
3838
#[prelude_import /* 0#1 */]
3939
use ::core /* 0#1 */::prelude /* 0#1 */::rust_2015 /* 0#1 */::*;
40-
#[macro_use /* 0#1 */]
4140
extern crate core /* 0#2 */;
4241
// Don't load unnecessary hygiene information from std
4342
extern crate std /* 0#0 */;

tests/ui/proc-macro/quote/debug.stdout

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
#![crate_type = "proc-macro"]
1414
#[prelude_import]
1515
use ::std::prelude::rust_2015::*;
16-
#[macro_use]
1716
extern crate std;
1817

1918
extern crate proc_macro;

tests/ui/rfcs/rfc-2497-if-let-chains/ast-pretty-check.stdout

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#![no_std]
33
#[prelude_import]
44
use ::std::prelude::rust_2015::*;
5-
#[macro_use]
65
extern crate std;
76
//@ check-pass
87
//@ compile-flags: -Z unpretty=expanded

tests/ui/type-alias-impl-trait/issue-60662.stdout

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
#![feature(type_alias_impl_trait)]
55
#[prelude_import]
66
use ::std::prelude::rust_2015::*;
7-
#[macro_use]
87
extern crate std;
98

109
trait Animal { }

tests/ui/unpretty/bad-literal.stdout

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#[prelude_import]
22
use ::std::prelude::rust_2015::*;
3-
#[macro_use]
43
extern crate std;
54
//@ compile-flags: -Zunpretty=hir
65
//@ check-fail

tests/ui/unpretty/debug-fmt-hir.stdout

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#[prelude_import]
22
use ::std::prelude::rust_2015::*;
3-
#[macro_use]
43
extern crate std;
54
//@ compile-flags: -Zunpretty=hir
65
//@ check-pass

tests/ui/unpretty/deprecated-attr.stdout

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#[prelude_import]
22
use ::std::prelude::rust_2015::*;
3-
#[macro_use]
43
extern crate std;
54
//@ compile-flags: -Zunpretty=hir
65
//@ check-pass

tests/ui/unpretty/diagnostic-attr.stdout

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#[prelude_import]
22
use ::std::prelude::rust_2015::*;
3-
#[macro_use]
43
extern crate std;
54
//@ compile-flags: -Zunpretty=hir
65
//@ check-pass

tests/ui/unpretty/expanded-exhaustive.stdout

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
#![allow(incomplete_features)]
2929
#[prelude_import]
3030
use std::prelude::rust_2024::*;
31-
#[macro_use]
3231
extern crate std;
3332

3433
#[prelude_import]

tests/ui/unpretty/expanded-interpolation.stdout

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
#![feature(if_let_guard)]
1414
#[prelude_import]
1515
use ::std::prelude::rust_2015::*;
16-
#[macro_use]
1716
extern crate std;
1817

1918
macro_rules! expr { ($expr:expr) => { $expr }; }

tests/ui/unpretty/flattened-format-args.stdout

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#[prelude_import]
22
use ::std::prelude::rust_2015::*;
3-
#[macro_use]
43
extern crate std;
54
//@ compile-flags: -Zunpretty=hir -Zflatten-format-args=yes
65
//@ check-pass

tests/ui/unpretty/let-else-hir.stdout

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#[prelude_import]
22
use ::std::prelude::rust_2015::*;
3-
#[macro_use]
43
extern crate std;
54
//@ compile-flags: -Zunpretty=hir
65
//@ check-pass

tests/ui/unpretty/self-hir.stdout

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#[prelude_import]
22
use ::std::prelude::rust_2015::*;
3-
#[macro_use]
43
extern crate std;
54
//@ compile-flags: -Zunpretty=hir
65
//@ check-pass

tests/ui/unpretty/unpretty-expr-fn-arg.stdout

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
#![allow(dead_code)]
1010
#[prelude_import]
1111
use ::std::prelude::rust_2015::*;
12-
#[macro_use]
1312
extern crate std;
1413

1514
fn main() ({ } as ())

0 commit comments

Comments
 (0)