Skip to content

Commit 5f85764

Browse files
committed
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 rust-lang#46708 and rust-lang#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 rust-lang#46112 backported to beta.)
1 parent 7db6372 commit 5f85764

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/test/compile-fail/issue-17959.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ struct G<T: ?Sized> {
1919
}
2020

2121
impl<T> Drop for G<T> {
22-
//~^ ERROR: The requirement `T: std::marker::Sized` is added only by the Drop impl. [E0367]
22+
//~^ ERROR: The requirement `T: core::marker::Sized` is added only by the Drop impl. [E0367]
2323
fn drop(&mut self) {
2424
if !self._ptr.is_null() {
2525
}

src/test/compile-fail/kindck-send-unsafe.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ fn assert_send<T:Send>() { }
1414

1515
fn test71<'a>() {
1616
assert_send::<*mut &'a isize>();
17-
//~^ ERROR `*mut &'a isize: std::marker::Send` is not satisfied
17+
//~^ ERROR `*mut &'a isize: core::marker::Send` is not satisfied
1818
}
1919

2020
fn main() {

src/test/ui/print_type_sizes/niche-filling.stdout

+2-2
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,11 @@ print-type-size type: `MyOption<bool>`: 1 bytes, alignment: 1 bytes
6969
print-type-size variant `None`: 0 bytes
7070
print-type-size variant `Some`: 1 bytes
7171
print-type-size field `.0`: 1 bytes
72-
print-type-size type: `MyOption<std::cmp::Ordering>`: 1 bytes, alignment: 1 bytes
72+
print-type-size type: `MyOption<core::cmp::Ordering>`: 1 bytes, alignment: 1 bytes
7373
print-type-size variant `None`: 0 bytes
7474
print-type-size variant `Some`: 1 bytes
7575
print-type-size field `.0`: 1 bytes
76-
print-type-size type: `std::cmp::Ordering`: 1 bytes, alignment: 1 bytes
76+
print-type-size type: `core::cmp::Ordering`: 1 bytes, alignment: 1 bytes
7777
print-type-size discriminant: 1 bytes
7878
print-type-size variant `Less`: 0 bytes
7979
print-type-size variant `Equal`: 0 bytes

0 commit comments

Comments
 (0)