about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorTakayuki Maeda <takoyaki0316@gmail.com>2022-10-15 02:45:11 +0900
committerTakayuki Maeda <takoyaki0316@gmail.com>2022-10-15 02:45:11 +0900
commit062ea9ce4ded4e5a864dfb4109d6533e03d67679 (patch)
treeae3a033aecc5cc3146583f978250700d6303702b /src
parent5378677c31e89ae2fe4de954631bde8efeac91d1 (diff)
downloadrust-062ea9ce4ded4e5a864dfb4109d6533e03d67679.tar.gz
rust-062ea9ce4ded4e5a864dfb4109d6533e03d67679.zip
remove no_core feature
Diffstat (limited to 'src')
-rw-r--r--src/test/ui/traits/issue-102989.rs5
-rw-r--r--src/test/ui/traits/issue-102989.stderr35
2 files changed, 12 insertions, 28 deletions
diff --git a/src/test/ui/traits/issue-102989.rs b/src/test/ui/traits/issue-102989.rs
index cb1e3271d26..62f95272fbf 100644
--- a/src/test/ui/traits/issue-102989.rs
+++ b/src/test/ui/traits/issue-102989.rs
@@ -1,9 +1,6 @@
-//~ ERROR can't find crate for `profiler_builtins`
-// compile-flags: -Cinstrument-coverage
 // normalize-stderr-test "loaded from .*libcore-.*.rlib" -> "loaded from SYSROOT/libcore-*.rlib"
 
-#![no_core]
-#![feature(no_core, lang_items)]
+#![feature(lang_items)]
 #[lang="sized"]
 trait Sized { } //~ ERROR found duplicate lang item `sized`
 
diff --git a/src/test/ui/traits/issue-102989.stderr b/src/test/ui/traits/issue-102989.stderr
index efea2251a13..efe1a246774 100644
--- a/src/test/ui/traits/issue-102989.stderr
+++ b/src/test/ui/traits/issue-102989.stderr
@@ -1,5 +1,5 @@
 error: `self` parameter is only allowed in associated functions
-  --> $DIR/issue-102989.rs:10:15
+  --> $DIR/issue-102989.rs:7:15
    |
 LL | fn ref_Struct(self: &Struct, f: &u32) -> &u32 {
    |               ^^^^ not semantically valid as function parameter
@@ -7,50 +7,37 @@ LL | fn ref_Struct(self: &Struct, f: &u32) -> &u32 {
    = note: associated functions are those in `impl` or `trait` definitions
 
 error[E0412]: cannot find type `Struct` in this scope
-  --> $DIR/issue-102989.rs:10:22
+  --> $DIR/issue-102989.rs:7:22
    |
 LL | fn ref_Struct(self: &Struct, f: &u32) -> &u32 {
    |                      ^^^^^^ not found in this scope
 
 error[E0425]: cannot find value `x` in this scope
-  --> $DIR/issue-102989.rs:14:13
+  --> $DIR/issue-102989.rs:11:13
    |
 LL |     let x = x << 1;
    |             ^ help: a local variable with a similar name exists: `f`
 
-error: `profiler_builtins` crate (required by compiler options) is not compatible with crate attribute `#![no_core]`
-
-error[E0463]: can't find crate for `profiler_builtins`
-   |
-   = note: the compiler may have been built without the profiler runtime
-
 error[E0152]: found duplicate lang item `sized`
-  --> $DIR/issue-102989.rs:8:1
+  --> $DIR/issue-102989.rs:5:1
    |
 LL | trait Sized { }
    | ^^^^^^^^^^^
    |
-   = note: the lang item is first defined in crate `core`.
+   = note: the lang item is first defined in crate `core` (which `std` depends on)
    = note: first definition in `core` loaded from SYSROOT/libcore-*.rlib
    = note: second definition in the local crate (`issue_102989`)
 
-error: `#[panic_handler]` function required, but not found
-
-error: language item required, but not found: `eh_personality`
-   |
-   = 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
-   = 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`
-
 error[E0277]: the size for values of type `{integer}` cannot be known at compilation time
-  --> $DIR/issue-102989.rs:14:15
+  --> $DIR/issue-102989.rs:11:15
    |
 LL |     let x = x << 1;
    |               ^^ doesn't have a size known at compile-time
    |
-   = help: the trait `core::marker::Sized` is not implemented for `{integer}`
+   = help: the trait `std::marker::Sized` is not implemented for `{integer}`
 
 error[E0308]: mismatched types
-  --> $DIR/issue-102989.rs:10:42
+  --> $DIR/issue-102989.rs:7:42
    |
 LL | fn ref_Struct(self: &Struct, f: &u32) -> &u32 {
    |    ----------                            ^^^^ expected `&u32`, found `()`
@@ -58,7 +45,7 @@ LL | fn ref_Struct(self: &Struct, f: &u32) -> &u32 {
    |    implicitly returns `()` as its body has no tail or `return` expression
    |
 note: consider returning one of these bindings
-  --> $DIR/issue-102989.rs:10:30
+  --> $DIR/issue-102989.rs:7:30
    |
 LL | fn ref_Struct(self: &Struct, f: &u32) -> &u32 {
    |                              ^
@@ -66,7 +53,7 @@ LL | fn ref_Struct(self: &Struct, f: &u32) -> &u32 {
 LL |     let x = x << 1;
    |         ^
 
-error: aborting due to 10 previous errors
+error: aborting due to 6 previous errors
 
-Some errors have detailed explanations: E0152, E0277, E0308, E0412, E0425, E0463.
+Some errors have detailed explanations: E0152, E0277, E0308, E0412, E0425.
 For more information about an error, try `rustc --explain E0152`.