Skip to content

Commit 062ea9c

Browse files
committedOct 14, 2022
remove no_core feature
1 parent 5378677 commit 062ea9c

File tree

2 files changed

+12
-28
lines changed

2 files changed

+12
-28
lines changed
 

‎src/test/ui/traits/issue-102989.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
//~ ERROR can't find crate for `profiler_builtins`
2-
// compile-flags: -Cinstrument-coverage
31
// normalize-stderr-test "loaded from .*libcore-.*.rlib" -> "loaded from SYSROOT/libcore-*.rlib"
42

5-
#![no_core]
6-
#![feature(no_core, lang_items)]
3+
#![feature(lang_items)]
74
#[lang="sized"]
85
trait Sized { } //~ ERROR found duplicate lang item `sized`
96

+11-24
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,59 @@
11
error: `self` parameter is only allowed in associated functions
2-
--> $DIR/issue-102989.rs:10:15
2+
--> $DIR/issue-102989.rs:7:15
33
|
44
LL | fn ref_Struct(self: &Struct, f: &u32) -> &u32 {
55
| ^^^^ not semantically valid as function parameter
66
|
77
= note: associated functions are those in `impl` or `trait` definitions
88

99
error[E0412]: cannot find type `Struct` in this scope
10-
--> $DIR/issue-102989.rs:10:22
10+
--> $DIR/issue-102989.rs:7:22
1111
|
1212
LL | fn ref_Struct(self: &Struct, f: &u32) -> &u32 {
1313
| ^^^^^^ not found in this scope
1414

1515
error[E0425]: cannot find value `x` in this scope
16-
--> $DIR/issue-102989.rs:14:13
16+
--> $DIR/issue-102989.rs:11:13
1717
|
1818
LL | let x = x << 1;
1919
| ^ help: a local variable with a similar name exists: `f`
2020

21-
error: `profiler_builtins` crate (required by compiler options) is not compatible with crate attribute `#![no_core]`
22-
23-
error[E0463]: can't find crate for `profiler_builtins`
24-
|
25-
= note: the compiler may have been built without the profiler runtime
26-
2721
error[E0152]: found duplicate lang item `sized`
28-
--> $DIR/issue-102989.rs:8:1
22+
--> $DIR/issue-102989.rs:5:1
2923
|
3024
LL | trait Sized { }
3125
| ^^^^^^^^^^^
3226
|
33-
= note: the lang item is first defined in crate `core`.
27+
= note: the lang item is first defined in crate `core` (which `std` depends on)
3428
= note: first definition in `core` loaded from SYSROOT/libcore-*.rlib
3529
= note: second definition in the local crate (`issue_102989`)
3630

37-
error: `#[panic_handler]` function required, but not found
38-
39-
error: language item required, but not found: `eh_personality`
40-
|
41-
= note: this can occur when a binary crate with `#![no_std]` is compiled for a target where `eh_personality` is defined in the standard library
42-
= help: you may be able to compile for a target that doesn't need `eh_personality`, specify a target with `--target` or in `.cargo/config`
43-
4431
error[E0277]: the size for values of type `{integer}` cannot be known at compilation time
45-
--> $DIR/issue-102989.rs:14:15
32+
--> $DIR/issue-102989.rs:11:15
4633
|
4734
LL | let x = x << 1;
4835
| ^^ doesn't have a size known at compile-time
4936
|
50-
= help: the trait `core::marker::Sized` is not implemented for `{integer}`
37+
= help: the trait `std::marker::Sized` is not implemented for `{integer}`
5138

5239
error[E0308]: mismatched types
53-
--> $DIR/issue-102989.rs:10:42
40+
--> $DIR/issue-102989.rs:7:42
5441
|
5542
LL | fn ref_Struct(self: &Struct, f: &u32) -> &u32 {
5643
| ---------- ^^^^ expected `&u32`, found `()`
5744
| |
5845
| implicitly returns `()` as its body has no tail or `return` expression
5946
|
6047
note: consider returning one of these bindings
61-
--> $DIR/issue-102989.rs:10:30
48+
--> $DIR/issue-102989.rs:7:30
6249
|
6350
LL | fn ref_Struct(self: &Struct, f: &u32) -> &u32 {
6451
| ^
6552
...
6653
LL | let x = x << 1;
6754
| ^
6855

69-
error: aborting due to 10 previous errors
56+
error: aborting due to 6 previous errors
7057

71-
Some errors have detailed explanations: E0152, E0277, E0308, E0412, E0425, E0463.
58+
Some errors have detailed explanations: E0152, E0277, E0308, E0412, E0425.
7259
For more information about an error, try `rustc --explain E0152`.

0 commit comments

Comments
 (0)
Please sign in to comment.