Skip to content

[beta]: Prepare the 1.31.0 beta release #55405

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 27 commits into from
Oct 29, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
a330092
[beta]: Prepare the 1.31.0 stable release
alexcrichton Oct 27, 2018
2404f5e
Remove `cargo new --edition` from release notes.
ehuss Oct 25, 2018
481bd16
Fix link to macros chapter
steveklabnik Oct 24, 2018
ff0605a
Remove redundant clone
sinkuu Oct 25, 2018
87f4ad1
Shrink `Statement`.
nnethercote Oct 25, 2018
dc4e0bd
Remove `PlaceContext` from API of `mir::Visitor::visit_projection_elem`.
pnkfelix Oct 17, 2018
3bb7999
restrict scope of methods that are only called within mod tree of par…
pnkfelix Oct 19, 2018
8a15d7b
Refactoring: added `PatternTypeAnnotation` wrapper around `UserTypeAn…
pnkfelix Oct 21, 2018
f279d8a
Added `mir::UserTypeProjection`, a stub for a structure that projects…
pnkfelix Oct 22, 2018
83e6c3c
Checkpoint: Added abstraction over collection of projections into use…
pnkfelix Oct 22, 2018
8f94230
Add the actual chain of projections to `UserTypeProjection`.
pnkfelix Oct 22, 2018
fb68889
Update mir-opt tests to reflect change to `AscribeUserType` to carry …
pnkfelix Oct 22, 2018
0cb0d49
regression test for ICE I encountered in my patch.
pnkfelix Oct 23, 2018
ad3c607
Add test for normalization during field-lookup on patterns with ascri…
pnkfelix Oct 25, 2018
5a85bb6
Add intern table for `List<ProjectionElem<'tcx, (), ()>>`.
pnkfelix Oct 26, 2018
5e52b66
Further foundational stuff on `ProjectionKind` before I add it to `As…
pnkfelix Oct 26, 2018
7a1093b
add user_ty.projs support to `AscribeUserType`.
pnkfelix Oct 26, 2018
66931a0
resolve: Record full parent scope data for imports
petrochenkov Oct 21, 2018
b909534
resolve: Refactor away `legacy_macro_imports`/`LegacyMacroImports`
petrochenkov Oct 25, 2018
8c65675
resolve: Absolute paths may be undetermined on 2018 edition
petrochenkov Oct 27, 2018
feea133
resolve: More precise spans for privacy errors
petrochenkov Oct 27, 2018
540d837
resolve: Make sure macros and imports are resolved in full parent scope
petrochenkov Oct 27, 2018
f7e7b3a
resolve: Desugar empty import groups into synthetic dummy imports
petrochenkov Oct 27, 2018
f186dce
Fix ordering of nested modules in non-mod.rs mods
cramertj Oct 19, 2018
1cc978d
Add note linking to Rust 2018 path semantics docs.
davidtwco Oct 18, 2018
4b3b4d2
back out bogus `Ok`-wrapping suggestion on `?` arm type mismatch
zackmdavis Oct 27, 2018
7c81496
fix errors caused by cherry picking
pietroalbini Oct 29, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix ordering of nested modules in non-mod.rs mods
Flatten relative offset into directory path before adding inline
(mod x { ... }) module names to the current directory path.

Fix #55094
  • Loading branch information
cramertj authored and pietroalbini committed Oct 29, 2018
commit f186dce560b113b7e30e39dfc147f7af616b38ca
11 changes: 11 additions & 0 deletions src/libsyntax/parse/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6426,6 +6426,17 @@ impl<'a> Parser<'a> {
self.directory.path.to_mut().push(&path.as_str());
self.directory.ownership = DirectoryOwnership::Owned { relative: None };
} else {
// We have to push on the current module name in the case of relative
// paths in order to ensure that any additional module paths from inline
// `mod x { ... }` come after the relative extension.
//
// For example, a `mod z { ... }` inside `x/y.rs` should set the current
// directory path to `/x/y/z`, not `/x/z` with a relative offset of `y`.
if let DirectoryOwnership::Owned { relative } = &mut self.directory.ownership {
if let Some(ident) = relative.take() { // remove the relative offset
self.directory.path.to_mut().push(ident.as_str());
}
}
self.directory.path.to_mut().push(&id.as_str());
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// compile-pass

mod x;

fn main() {}
5 changes: 5 additions & 0 deletions src/test/ui/non_modrs_mods_and_inline_mods/x.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// ignore-test: not a test

pub mod y {
pub mod z;
}
1 change: 1 addition & 0 deletions src/test/ui/non_modrs_mods_and_inline_mods/x/y/z/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// ignore-test: not a test