Skip to content

Commit b322656

Browse files
committed
Fix core library test with proper canonical path
Import from core library was wrong, it misses several crate directives since we're no longer dealing with multiple files. gcc/testsuite/ChangeLog: * rust/compile/issue-2905-2.rs: Import from core library into a single file misses the crate directives. Signed-off-by: Pierre-Emmanuel Patry <[email protected]>
1 parent 65574f0 commit b322656

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

gcc/testsuite/rust/compile/issue-2905-2.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ pub mod core {
1717
}
1818

1919
pub mod slice {
20-
use core::marker::PhantomData;
21-
use core::option::Option;
20+
use crate::core::marker::PhantomData;
21+
use crate::core::option::Option;
2222

23-
impl<T> core::iter::IntoIterator for &[T] {
23+
impl<T> crate::core::iter::IntoIterator for &[T] {
2424
type Item = &T;
2525
type IntoIter = Weird<T>;
2626

@@ -108,7 +108,7 @@ pub mod core {
108108
}
109109

110110
pub mod iter {
111-
use option::Option;
111+
use crate::core::option::Option;
112112

113113
pub trait IntoIterator {
114114
type Item;

0 commit comments

Comments
 (0)