Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
a113609
keyword docs for else and inkeyword docs for else and in.
gilescope Dec 30, 2019
57f1bb1
clean up E0308 explanation
GuillaumeGomez Feb 13, 2020
64460a1
Update tests
GuillaumeGomez Mar 8, 2020
f5efb68
miri: categorize errors into "unsupported" and "UB"
RalfJung Mar 8, 2020
d02543a
fmt, tweak messages and bless
RalfJung Mar 8, 2020
9a95b01
generalize InvalidNullPointerUsage to InvalidIntPointerUsage
RalfJung Mar 8, 2020
3ebcd78
fmt, and fix rustfmt-induced rebase hickup
RalfJung Mar 8, 2020
2764d3d
start Miri messages lower-case
RalfJung Mar 9, 2020
3e61442
explain why we catch PointerUseAfterFree
RalfJung Mar 9, 2020
d8f8168
avoid boolean inversion
RalfJung Mar 9, 2020
9681422
we are on 2018 edition, use try block
RalfJung Mar 9, 2020
93436d8
make error message less confusing
RalfJung Mar 9, 2020
e219dd4
fmt
RalfJung Mar 11, 2020
b2779d8
Use smaller discriminants for generators
jonas-schievink Mar 9, 2020
4266807
Add a test for generator discriminants
jonas-schievink Mar 9, 2020
49aabd8
Fix rebase fallout
jonas-schievink Mar 14, 2020
73a625b
remove unnecessary hir::map imports
Centril Mar 11, 2020
4392a8b
use direct imports for `rustc::{lint, session}`.
Centril Mar 11, 2020
5a9ccc9
Remove `free_region_map` from `TypeckTables`
matthewjasper Nov 30, 2019
cefd030
Don't use `TypeckTables` in NiceRegionError
matthewjasper Feb 15, 2020
0a7f16e
Erase regions in writeback
matthewjasper Feb 15, 2020
1ee5829
Update tests for erasing regions in typeck
matthewjasper Feb 15, 2020
aa20d96
Don't prepend with space before paren
GuillaumeGomez Mar 17, 2020
429b16e
Make `newtype_index` methods const
ecstatic-morse Mar 10, 2020
7f5a284
Rename `from_u32_const` -> `from_u32`
ecstatic-morse Mar 10, 2020
cc4a577
Add requisite feature gates for const assert
ecstatic-morse Mar 10, 2020
9ac93ee
Hold index of generator `self` arg in `const`
ecstatic-morse Mar 10, 2020
81172d8
Update pretty tests
GuillaumeGomez Mar 17, 2020
9a017da
Update rustdoc test and remove TODO comment
GuillaumeGomez Mar 17, 2020
bc75cba
submod_path_from_attr: simplify & document
Centril Mar 7, 2020
2899a58
extract error_cannot_declare_mod_here
Centril Mar 7, 2020
185c1d3
extract error_decl_mod_in_block
Centril Mar 7, 2020
2db5d49
simplify submod_path
Centril Mar 7, 2020
803de31
submod_path: use id.span
Centril Mar 7, 2020
7108b7f
extract parse_mod
Centril Mar 7, 2020
dfcefa4
extract error_on_circular_module
Centril Mar 7, 2020
ca098b1
detach submod_path from Parser
Centril Mar 8, 2020
53a633f
decouple push_directory from Parser
Centril Mar 8, 2020
98e71cd
decouple eval_src_mod from Parser
Centril Mar 8, 2020
b9e1b26
expand: use push_directory
Centril Mar 8, 2020
8bab88f
de-fatalize outline module parsing
Centril Mar 8, 2020
463995f
extract parse_external_module
Centril Mar 8, 2020
59bf8a0
extract error_on_circular_module
Centril Mar 8, 2020
83a757a
outline modules: parse -> expand.
Centril Mar 8, 2020
f1ca996
parse: module parsing -> item.rs
Centril Mar 8, 2020
ddcc8ec
move Directory -> parser::module
Centril Mar 8, 2020
3796fae
{rustc_parse::parser -> rustc_expand}::module
Centril Mar 8, 2020
31ee8e0
{rustc_parse -> rustc_expand}::config
Centril Mar 8, 2020
a6cb04f
add test for stripped nested outline module
Centril Mar 8, 2020
7d0e5bb
parser/expand: minor cleanup
Centril Mar 9, 2020
fe71342
tweak outline module parsing spans
Centril Mar 9, 2020
41a0b3e
use pretty-compare-only in a test
Centril Mar 10, 2020
5ee4f6f
fix pre-expansion linting infra
Centril Mar 15, 2020
e301291
fix rebase fallout
Centril Mar 15, 2020
8caf688
--bless windows test
Centril Mar 17, 2020
287c4eb
Tidy: fix running rustfmt twice
ehuss Mar 18, 2020
5610684
Rollup merge of #67749 - gilescope:keyword-in, r=Dylan-DPC
Centril Mar 18, 2020
8188b21
Rollup merge of #69139 - GuillaumeGomez:cleanup-e0308, r=Dylan-DPC
Centril Mar 18, 2020
3f583fc
Rollup merge of #69189 - matthewjasper:erase-the-world, r=nikomatsakis
Centril Mar 18, 2020
4118ff6
Rollup merge of #69837 - jonas-schievink:gen-discr-opt, r=tmandry
Centril Mar 18, 2020
23b79d8
Rollup merge of #69838 - Centril:expand-module, r=petrochenkov
Centril Mar 18, 2020
a958314
Rollup merge of #69839 - RalfJung:miri-error-cleanup, r=oli-obk
Centril Mar 18, 2020
2521849
Rollup merge of #69899 - ecstatic-morse:const-idx-methods, r=oli-obk
Centril Mar 18, 2020
292c538
Rollup merge of #69920 - Centril:hir-cleanup, r=Zoxc
Centril Mar 18, 2020
60a2d06
Rollup merge of #70075 - GuillaumeGomez:fix-repr-display, r=petrochenkov
Centril Mar 18, 2020
b6f61a1
Rollup merge of #70106 - ehuss:fix-tidy-fmt-twice, r=Mark-Simulacrum
Centril Mar 18, 2020
779e592
ci: use python from the correct path
pietroalbini Mar 18, 2020
11053ba
Rollup merge of #70112 - Centril:rollup-gpi5tbq, r=Centril
pietroalbini Mar 18, 2020
94ed071
Rollup merge of #70116 - pietroalbini:ci-fix-windows-python-path, r=M…
pietroalbini Mar 18, 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
move Directory -> parser::module
  • Loading branch information
Centril committed Mar 18, 2020
commit ddcc8ec89de7c2637a012eb14b1b07c8b9426d1e
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