Skip to content
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

Rollup of 7 pull requests #70057

Closed
wants to merge 41 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
71ebc61
resolve: Simplify `fn report_privacy_error`
petrochenkov Mar 7, 2020
580c6a2
resolve: Print import chains on privacy errors
petrochenkov Mar 7, 2020
f4083c6
Add the "consider importing it directly" label to public imports as well
petrochenkov Mar 11, 2020
e80cb20
resolve: Fix regression in resolution of raw keywords in paths
petrochenkov Mar 14, 2020
81099c2
VariantSizeDifferences: bail on SizeOverflow
Centril Mar 10, 2020
f53f9a8
Bump the bootstrap compiler
jonas-schievink Mar 15, 2020
ce5e49f
Use sublice patterns to avoid computing the len
tesuji Mar 16, 2020
e1bc9af
Fix wrong deref
tesuji Mar 16, 2020
7894509
Fiddle `ParamEnv` through to a place that used to use `ParamEnv::empt…
oli-obk Mar 16, 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
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
9b26188
Rollup merge of #69811 - petrochenkov:privdiag2, r=estebank
Centril Mar 16, 2020
b158edc
Rollup merge of #69838 - Centril:expand-module, r=petrochenkov
Centril Mar 16, 2020
1e3b445
Rollup merge of #69881 - Centril:fix-69485, r=oli-obk
Centril Mar 16, 2020
6255941
Rollup merge of #70000 - petrochenkov:rawkeypars, r=davidtwco
Centril Mar 16, 2020
140529e
Rollup merge of #70029 - jonas-schievink:bootstrap, r=Centril
Centril Mar 16, 2020
a56761d
Rollup merge of #70046 - lzutao:patch-1, r=Centril
Centril Mar 16, 2020
c898394
Rollup merge of #70049 - oli-obk:param_env_empty_considered_unimpleme…
Centril Mar 16, 2020
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
{rustc_parse -> rustc_expand}::config
  • Loading branch information
Centril committed Mar 16, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit c16f0d3f4da2c5ca2fdd891c467ca157c1354d1d
14 changes: 3 additions & 11 deletions src/librustc_parse/config.rs → src/librustc_expand/config.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
//! Process the potential `cfg` attributes on a module.
//! Also determine if the module should be included in this configuration.
//!
//! This module properly belongs in rustc_expand, but for now it's tied into
//! parsing, so we leave it here to avoid complicated out-of-line dependencies.
//!
//! A principled solution to this wrong location would be to implement [#64197].
//!
//! [#64197]: https://github.com/rust-lang/rust/issues/64197

use crate::{parse_in, validate_attr};
//! Conditional compilation stripping.

use rustc_ast::ast::{self, AttrItem, Attribute, MetaItem};
use rustc_ast::attr::HasAttrs;
use rustc_ast::mut_visit::*;
@@ -21,6 +12,7 @@ use rustc_feature::{Feature, Features, State as FeatureState};
use rustc_feature::{
ACCEPTED_FEATURES, ACTIVE_FEATURES, REMOVED_FEATURES, STABLE_REMOVED_FEATURES,
};
use rustc_parse::{parse_in, validate_attr};
use rustc_session::parse::{feature_err, ParseSess};
use rustc_span::edition::{Edition, ALL_EDITIONS};
use rustc_span::symbol::{sym, Symbol};
2 changes: 1 addition & 1 deletion src/librustc_expand/expand.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use crate::base::*;
use crate::config::StripUnconfigured;
use crate::configure;
use crate::hygiene::{ExpnData, ExpnId, ExpnKind, SyntaxContext};
use crate::mbe::macro_rules::annotate_err_with_kind;
use crate::module::{parse_external_mod, push_directory, Directory, DirectoryOwnership};
@@ -18,7 +19,6 @@ use rustc_ast_pretty::pprust;
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::Parser;
use rustc_parse::validate_attr;
use rustc_session::lint::builtin::UNUSED_DOC_COMMENTS;
4 changes: 3 additions & 1 deletion src/librustc_expand/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![feature(bool_to_option)]
#![feature(cow_is_borrowed)]
#![feature(crate_visibility_modifier)]
#![feature(decl_macro)]
@@ -34,9 +35,10 @@ pub use mbe::macro_rules::compile_declarative_macro;
crate use rustc_span::hygiene;
pub mod base;
pub mod build;
#[macro_use]
pub mod config;
pub mod expand;
pub mod module;
pub use rustc_parse::config;
pub mod proc_macro;

crate mod mbe;
2 changes: 0 additions & 2 deletions src/librustc_parse/lib.rs
Original file line number Diff line number Diff line change
@@ -26,8 +26,6 @@ pub mod parser;
use parser::{emit_unclosed_delims, make_unclosed_delims_error, Parser};
pub mod lexer;
pub mod validate_attr;
#[macro_use]
pub mod config;

// A bunch of utility functions of the form `parse_<thing>_from_<source>`
// where <thing> includes crate, expr, item, stmt, tts, and one that
2 changes: 1 addition & 1 deletion src/librustc_parse/validate_attr.rs
Original file line number Diff line number Diff line change
@@ -57,7 +57,7 @@ pub fn parse_meta<'a>(sess: &'a ParseSess, attr: &Attribute) -> PResult<'a, Meta
})
}

crate fn check_meta_bad_delim(sess: &ParseSess, span: DelimSpan, delim: MacDelimiter, msg: &str) {
pub fn check_meta_bad_delim(sess: &ParseSess, span: DelimSpan, delim: MacDelimiter, msg: &str) {
if let ast::MacDelimiter::Parenthesis = delim {
return;
}