8000 Rollup of 8 pull requests by Centril · Pull Request #70066 · rust-lang/rust · GitHub
[go: up one dir, main page]

Skip to content

Rollup of 8 pull requests #70066

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

Closed
wants to merge 47 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
d6a17b5
Move tidy check to mingw-check
JohnTitor Mar 4, 2020
726d518
bootstrap: Use hash to determine if sanitizers needs to be rebuilt
tmiasko Mar 5, 2020
d49306d
implement zeroed and uninitialized with MaybeUninit
RalfJung Mar 11, 2020
c7eb0f2
fix expand-to-unstable test
RalfJung Mar 11, 2020
30bf3e1
Remove `free_region_map` from `TypeckTables`
matthewjasper Nov 30, 2019
f206c3e
Don't use `TypeckTables` in NiceRegionError
matthewjasper Feb 15, 2020
1fd3246
Erase regions in writeback
matthewjasper Feb 15, 2020
9772562
Update tests for erasing regions in typeck
matthewjasper Feb 15, 2020
996a51b
init-large-type test needs optimizations
RalfJung Mar 16, 2020
a2160e6
make mem::{zeroed,uninitialized} inline(always)
RalfJung Mar 16, 2020
ec86270
Make macro metavars respect (non-)hygiene
matthewjasper Mar 11, 2020
a4125a6
submod_path_from_attr: simplify & document
Centril Mar 7, 2020
48b9526
extract error_cannot_declare_mod_here
Centril Mar 7, 2020
bbd2129
extract error_decl_mod_in_block
Centril Mar 7, 2020
7042554
8000 simplify submod_path
Centril Mar 7, 2020
586c9b5
submod_path: use id.span
Centril Mar 7, 2020
d06031c
extract parse_mod
Centril Mar 7, 2020
a2a32c7
extract error_on_circular_module
Centril Mar 7, 2020
4d05f90
detach submod_path from Parser
Centril Mar 8, 2020
c824f5d
decouple push_directory from Parser
Centril Mar 8, 2020
4a70313
decouple eval_src_mod from Parser
Centril Mar 8, 2020
033f8a2
expand: use push_directory
Centril Mar 8, 2020
60a00b0
de-fatalize outline module parsing
Centril Mar 8, 2020
16d444a
extract parse_external_module
Centril Mar 8, 2020
a1f9953
extract error_on_circular_module
Centril Mar 8, 2020
97fa2bd
outline modules: parse -> expand.
Centril Mar 8, 2020
fb540a9
parse: module parsing -> item.rs
Centril Mar 8, 2020
e2cd4d0
move Directory -> parser::module
Centril Mar 8, 2020
e830157
{rustc_parse::parser -> rustc_expand}::module
Centril Mar 8, 2020
c16f0d3
{rustc_parse -> rustc_expand}::config
Centril Mar 8, 2020
2454395
add test for stripped nested outline module
Centril Mar 8, 2020
ed9d81e
parser/expand: minor cleanup
Centril Mar 9, 2020
9741bb6
tweak outline module parsing spans
Centril Mar 9, 2020
48b8ecc
use pretty-compare-only in a test
Centril Mar 10, 2020
998b33e
fix pre-expansion linting infra
Centril Mar 15, 2020
5cc4e94
fix rebase fallout
Centril Mar 15, 2020
442e5ff
Small fixes in documentation
JOE1994 Mar 17, 2020
194de27
Update books
ehuss Mar 17, 2020
8b0698b
--bless windows test
Centril Mar 17, 2020
9d56bb0
Rollup merge of #68746 - matthewjasper:metahygiene, r=petrochenkov
Centril Mar 17, 2020
fe69360
Rollup merge of #69189 - matthewjasper:erase-the-world, r=nikomatsakis
Centril Mar 17, 2020
2b7c6a3
Rollup merge of #69688 - JohnTitor:move-tidy, r=Mark-Simulacrum
Centril Mar 17, 2020
94603b3
Rollup merge of #69735 - tmiasko:bootstrap-sanitizers-hash, r=Mark-Si…
Centril Mar 17, 2020
90ebf47
Rollup merge of #69838 - Centril:expand-module, r=petrochenkov
Centril Mar 17, 2020
8582b04
Rollup merge of #69922 - RalfJung:less-intrinsic, r=oli-obk
Centril Mar 17, 2020
dd29171
Rollup merge of #70061 - JOE1994:patch-2, r=Dylan-DPC
Centril Mar 17, 2020
2e0141f
Rollup merge of #70064 - ehuss:update-books, r=ehuss
Centril Mar 17, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading 8000
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
move Directory -> parser::module
  • Loading branch information
Centril committed Mar 16, 2020
commit e2cd4d0bfa723c0df9f68d8d3a7531ca5d7d5f3b
3 changes: 2 additions & 1 deletion src/librustc_expand/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ use rustc_attr::{self as attr, Deprecation, HasAttrs, Stability};
use rustc_data_structures::fx::FxHashMap;
use rustc_data_structures::sync::{self, Lrc};
use rustc_errors::{DiagnosticBuilder, DiagnosticId};
use rustc_parse::{self, parser, DirectoryOwnership, MACRO_ARGUMENTS};
use rustc_parse::parser::module::DirectoryOwnership;
use rustc_parse::{self, parser, MACRO_ARGUMENTS};
use rustc_session::parse::ParseSess;
use rustc_span::edition::Edition;
use rustc_span::hygiene::{AstPass, ExpnData, ExpnId, ExpnKind};
Expand Down
5 changes: 3 additions & 2 deletions src/librustc_expand/expand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@ use rustc_attr::{self as attr, is_builtin_attr, HasAttrs};
use rustc_errors::{Applicability, FatalError, PResult};
use rustc_feature::Features;
use rustc_parse::configure;
use rustc_parse::parser::module::{parse_external_mod, push_directory};
use rustc_parse::parser::module::{
parse_external_mod, push_directory, Directory, DirectoryOwnership,
};
use rustc_parse::parser::Parser;
use rustc_parse::validate_attr;
use rustc_parse::{Directory, DirectoryOwnership};
use rustc_session::lint::builtin::UNUSED_DOC_COMMENTS;
use rustc_session::lint::BuiltinLintDiagnostics;
use rustc_session::parse::{feature_err, ParseSess};
Expand Down
18 changes: 1 addition & 17 deletions src/librustc_parse/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use rustc_errors::{Diagnostic, FatalError, Level, PResult};
use rustc_session::parse::ParseSess;
use rustc_span::{FileName, SourceFile, Span};

use std::path::{Path, PathBuf};
use std::path::Path;
use std::str;

use log::info;
Expand All @@ -29,22 +29,6 @@ pub mod validate_attr;
#[macro_use]
pub mod config;

#[derive(Clone)]
pub struct Directory {
pub path: PathBuf,
pub ownership: DirectoryOwnership,
}

#[derive(Copy, Clone)]
pub enum DirectoryOwnership {
Owned {
// None if `mod.rs`, `Some("foo")` if we're in `foo.rs`.
relative: Option<ast::Ident>,
},
UnownedViaBlock,
UnownedViaMod,
}

// A bunch of utility functions of the form `parse_<thing>_from_<source>`
// where <thing> includes crate, expr, item, stmt, tts, and one that
// uses a HOF to parse anything, and <source> includes file and
Expand Down
21 changes: 18 additions & 3 deletions src/librustc_parse/parser/module.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,30 @@
use crate::{new_sub_parser_from_file, Directory, DirectoryOwnership};
use crate::new_sub_parser_from_file;

use rustc_ast::ast::{self, Attribute, Ident, Mod};
use rustc_ast::attr;
use rustc_ast::token;
use rustc_ast::{attr, token};
use rustc_errors::{struct_span_err, PResult};
use rustc_session::parse::ParseSess;
use rustc_span::source_map::{FileName, Span};
use rustc_span::symbol::sym;

use std::path::{self, Path, PathBuf};

#[derive(Clone)]
pub struct Directory {
pub path: PathBuf,
pub ownership: DirectoryOwnership,
}

#[derive(Copy, Clone)]
pub enum DirectoryOwnership {
Owned {
// None if `mod.rs`, `Some("foo")` if we're in `foo.rs`.
relative: Option<ast::Ident>,
},
UnownedViaBlock,
UnownedViaMod,
}

/// Information about the path to a module.
// Public for rustfmt usage.
pub struct ModulePath<'a> {
Expand Down
0