summary refs log tree commit diff
diff options
context:
space:
mode:
authorFelix S. Klock II <pnkfelix@pnkfx.org>2017-12-21 11:38:12 +0100
committerFelix S. Klock II <pnkfelix@pnkfx.org>2017-12-21 13:25:32 +0100
commit5f85764788dba12d57a8955619be53634386228a (patch)
tree888cb7a78cf7b2afc4422690552470da132d4b78
parent7db6372d8576e84715775d58c87e47dbd8cad492 (diff)
downloadrust-5f85764788dba12d57a8955619be53634386228a.tar.gz
rust-5f85764788dba12d57a8955619be53634386228a.zip
reverted tests to cope with "regression" back to printing leading `core::`
The reason we see `core::` even after visiting the `std` crate first
is the special case code that looks like this:

```rust
    Entry::Occupied(mut entry) => {
        // If `child` is defined in crate `cnum`, ensure
        // that it is mapped to a parent in `cnum`.
        if child.krate == cnum && entry.get().krate != cnum {
            entry.insert(parent);
        }
    }
```

This causes items to be associated with the crates they were
originally defined in, even if we had encountered them during the
traversal of an earlier crate.

(Having said that, I am not clear on why this same logic does not
apply when both #46708 and #46838 have been applied. But at this
point, I am just happy to have a plausible explanation for why we see
`core::foo::bar` in the output for these tests, and want to focus on
getting this fix for #46112 backported to beta.)
-rw-r--r--src/test/compile-fail/issue-17959.rs2
-rw-r--r--src/test/compile-fail/kindck-send-unsafe.rs2
-rw-r--r--src/test/ui/print_type_sizes/niche-filling.stdout4
3 files changed, 4 insertions, 4 deletions
diff --git a/src/test/compile-fail/issue-17959.rs b/src/test/compile-fail/issue-17959.rs
index 37c8173c4f6..23be4d35361 100644
--- a/src/test/compile-fail/issue-17959.rs
+++ b/src/test/compile-fail/issue-17959.rs
@@ -19,7 +19,7 @@ struct G<T: ?Sized> {
 }
 
 impl<T> Drop for G<T> {
-//~^ ERROR: The requirement `T: std::marker::Sized` is added only by the Drop impl. [E0367]
+//~^ ERROR: The requirement `T: core::marker::Sized` is added only by the Drop impl. [E0367]
     fn drop(&mut self) {
         if !self._ptr.is_null() {
         }
diff --git a/src/test/compile-fail/kindck-send-unsafe.rs b/src/test/compile-fail/kindck-send-unsafe.rs
index c717d1a72e0..ecee2e0a4c6 100644
--- a/src/test/compile-fail/kindck-send-unsafe.rs
+++ b/src/test/compile-fail/kindck-send-unsafe.rs
@@ -14,7 +14,7 @@ fn assert_send<T:Send>() { }
 
 fn test71<'a>() {
     assert_send::<*mut &'a isize>();
-    //~^ ERROR `*mut &'a isize: std::marker::Send` is not satisfied
+    //~^ ERROR `*mut &'a isize: core::marker::Send` is not satisfied
 }
 
 fn main() {
diff --git a/src/test/ui/print_type_sizes/niche-filling.stdout b/src/test/ui/print_type_sizes/niche-filling.stdout
index 0f53e7722dd..af3e89a936e 100644
--- a/src/test/ui/print_type_sizes/niche-filling.stdout
+++ b/src/test/ui/print_type_sizes/niche-filling.stdout
@@ -69,11 +69,11 @@ print-type-size type: `MyOption<bool>`: 1 bytes, alignment: 1 bytes
 print-type-size     variant `None`: 0 bytes
 print-type-size     variant `Some`: 1 bytes
 print-type-size         field `.0`: 1 bytes
-print-type-size type: `MyOption<std::cmp::Ordering>`: 1 bytes, alignment: 1 bytes
+print-type-size type: `MyOption<core::cmp::Ordering>`: 1 bytes, alignment: 1 bytes
 print-type-size     variant `None`: 0 bytes
 print-type-size     variant `Some`: 1 bytes
 print-type-size         field `.0`: 1 bytes
-print-type-size type: `std::cmp::Ordering`: 1 bytes, alignment: 1 bytes
+print-type-size type: `core::cmp::Ordering`: 1 bytes, alignment: 1 bytes
 print-type-size     discriminant: 1 bytes
 print-type-size     variant `Less`: 0 bytes
 print-type-size     variant `Equal`: 0 bytes