gcc/testsuite/ChangeLog:
* rust/compile/nr2/exclude: Remove entries.
* rust/compile/pub_restricted_1.rs: Adjust expected error
messages and only run with name resolution 2.0 enabled.
* rust/compile/pub_restricted_2.rs: Likewise.
Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
issue-3315-2.rs
privacy8.rs
-pub_restricted_1.rs
-pub_restricted_2.rs
issue-2905-2.rs
torture/alt_patterns1.rs
torture/name_resolve1.rs
+// { dg-additional-options "-frust-name-resolution-2.0" }
+
pub mod foo {
pub mod bar {
pub fn baz() {}
}
}
-pub(in foo::fah::baz) struct A1; // { dg-error "cannot find simple path segment .fah." }
-pub(in fro::bulator::saindoux) struct A2; // { dg-error "cannot find simple path segment .fro." }
-pub(in foo::bar::saindoux) struct A3; // { dg-error "cannot find simple path segment .saindoux." }
+pub(in foo::fah::baz) struct A1; // { dg-error "could not resolve path .foo::fah::baz." }
+pub(in fro::bulator::saindoux) struct A2; // { dg-error "could not resolve path .fro::bulator::saindoux." }
+pub(in foo::bar::saindoux) struct A3; // { dg-error "could not resolve path .foo::bar::saindoux." }
fn main() {}
-// { dg-additional-options "-w" }
+// { dg-additional-options "-w -frust-name-resolution-2.0" }
mod foo {
mod bar {
mod baz {
- pub(in baz) struct A0;
- pub(in bar::baz) struct A1;
+ pub(in super::baz) struct A0;
+ pub(in super::super::bar::baz) struct A1;
pub(in foo::bar::baz) struct A2;
mod sain {
mod doux {}
}
- pub(in sain) struct A3; // { dg-error "restricted path is not an ancestor of the current module" }
- pub(in sain::doux) struct A4; // { dg-error "restricted path is not an ancestor of the current module" }
+ pub(in self::sain) struct A3; // { dg-error "restricted path is not an ancestor of the current module" }
+ pub(in self::sain::doux) struct A4; // { dg-error "restricted path is not an ancestor of the current module" }
}
}
}