Skip to content

Commit ba79257

Browse files
committed
Move const tests for std::path::Prefix to library\core
Part of rust-lang#76268
1 parent 770ecd2 commit ba79257

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

library/std/src/path/tests.rs

+10
Original file line numberDiff line numberDiff line change
@@ -1392,3 +1392,13 @@ fn into_rc() {
13921392
assert_eq!(&*rc2, path);
13931393
assert_eq!(&*arc2, path);
13941394
}
1395+
1396+
#[test]
1397+
fn prefix_const() {
1398+
// test that the methods of `Prefix` are usable in a const context
1399+
1400+
const PREFIX: Prefix<'_> = Prefix::Disk(2);
1401+
1402+
const IS_VERBATIM: bool = PREFIX.is_verbatim();
1403+
assert!(!IS_VERBATIM);
1404+
}

src/test/ui/consts/std/path.rs

-10
This file was deleted.

0 commit comments

Comments
 (0)