about summary refs log tree commit diff
path: root/src/librustc
AgeCommit message (Collapse)AuthorLines
2019-07-10Auto merge of #62339 - ↵bors-0/+7
pnkfelix:issue-61188-use-visitor-for-structural-match-check, r=nikomatsakis use visitor for #[structural_match] check This changes the code so that we recur down the structure of a type of a const (rather than just inspecting at a shallow one or two levels) when we are looking to see if it has an ADT that did not derive `PartialEq` and `Eq`. Fix #61188 Fix #62307 Cc #62336
2019-07-10Remove writer function from PrintStateMark Rousskov-5/+1
2019-07-10Use constant instead of magic numberMark Rousskov-1/+1
2019-07-10Remove needless indent argumentsMark Rousskov-16/+7
We're always indenting by INDENT_UNIT anyway
2019-07-10Properly case indent_unit constantMark Rousskov-26/+25
2019-07-10Move pp::Printer helpers to direct implMark Rousskov-2/+13
2019-07-10Rename is_bol -> is_beginning_of_lineMark Rousskov-2/+2
Also moves it to pp::Printer from PrintState.
2019-07-10Remove needless indirection in bcloseMark Rousskov-6/+2
2019-07-10Move pp::Printer out field to owned StringMark Rousskov-19/+12
This enforces that eof() must be called to get the String out, and generally is better from an API perspective. No users of pretty printing pre-allocate the buffer.
2019-07-10print_crate returns String instead of taking an out pointerMark Rousskov-5/+5
2019-07-10Replace src: &mut dyn Read with StringMark Rousskov-3/+2
2019-07-10Combine comment-handling logic into structMark Rousskov-34/+8
This also permits sharing the underlying code between pprust and hir::print.
2019-07-10Inline State::newMark Rousskov-9/+1
There was only one callsite for each and this removes the unwrap_or_default's on the comments argument
2019-07-10Stop Option-wrapping commentsMark Rousskov-4/+4
We always check against the length before indexing anyway.
2019-07-10Remove unused boxes vectorMark Rousskov-15/+0
2019-07-10Move literal_to_string to fmt::DisplayMark Rousskov-2/+2
2019-07-10Auto merge of #62441 - RalfJung:place-ptr-normalization, r=oli-obkbors-13/+20
Miri: Provide pointer forcing methods for MemPlace and Op These are useful when one wants to to a lot of work with some place or operand and not to int-to-ptr casts all the time. In particular, this is needed to fix some test failures in Miri: we need to normalize before starting a visitor that walks a run-time value, so that we can later be sure (during the visitor walk) that we have a proper `Pointer`. Also see the Miri side at https://github.com/rust-lang/miri/pull/830. Cc @eddyb @oli-obk
2019-07-10Rollup merge of #61853 - EricRahm:use_warning, r=varkorMazdak Farrokhzad-4/+4
Emit warning when trying to use PGO in conjunction with unwinding on … …Windows. This reduces the error introduced for #61002 to just a warning.
2019-07-09Auto merge of #62542 - Centril:rollup-5mpb8tu, r=Centrilbors-4/+3
Rollup of 9 pull requests Successful merges: - #62417 (Fix ICEs when `Self` is used in type aliases) - #62450 (Raise the default recursion limit to 128) - #62470 (Prevent shrinking of "crate select" element on Firefox) - #62515 (cli: make help output for -l and -L consistent) - #62520 (Regression test for issue 42574.) - #62526 (normalize use of backticks in compiler messages for libsyntax/feature_gate.rs) - #62527 (clarify that debug_assert does not completely omits the code) - #62535 (ci: Configure $CI_JOB_NAME correctly) - #62541 (Add spastorino for rustc-guide toolstate) Failed merges: r? @ghost
2019-07-09Emit warning when trying to use PGO in conjunction with unwinding on Windows.Eric Rahm-4/+4
2019-07-09Rollup merge of #62515 - tshepang:consistent, r=CentrilMazdak Farrokhzad-3/+2
cli: make help output for -l and -L consistent
2019-07-09Rollup merge of #62450 - nagisa:reclimit, r=pnkfelixMazdak Farrokhzad-1/+1
Raise the default recursion limit to 128 The previous limit of 64 is being (just) barely hit by genuine code out there, which is causing issues like https://github.com/rust-lang/rust/issues/62059 to rear their end. Ideally, we wouldn’t have such arbitrary limits at all, but while we do, it makes a lot of sense to just raise this limit whenever genuine use-cases end up hitting it. r? @pnkfelix Fixes https://github.com/rust-lang/rust/issues/62059
2019-07-09Auto merge of #62221 - jonas-schievink:normalize-impl-trait, r=nikomatsakisbors-0/+6
Normalize projections appearing in `impl Trait` Fixes #60414 This does not try to do the same for `existential type`s (which have the same bug), since that always seems to lead to cycle errors.
2019-07-09Auto merge of #62233 - matthewjasper:exit-arm-scopes, r=pnkfelixbors-6/+10
Exit arm scopes Due to a bug in the HIR CFG construction, borrows for arm scopes were incorrectly leaking into other arms. This PR also includes some drive-by improvements to `-Zunpretty=hir,identified` that would have been helpful while investigating this. Closes #62107
2019-07-09Delay bug; this sidesteps ICE'ing when compiler is just doing error-recovery.Felix S. Klock II-9/+10
2019-07-09Rollup merge of #62090 - ↵Mazdak Farrokhzad-1/+75
davidtwco:ice-async-await-out-of-range-substitution, r=nikomatsakis typeck: merge opaque type inference logic Fixes #55872. See [relevant Zulip topic](https://rust-lang.zulipchat.com/#narrow/stream/187312-wg-async-foundations/topic/type.20parameter.20out.20of.20range.20.2355872). r? @nikomatsakis
2019-07-08Avoid infinite looping in `print_def_path`.Felix S. Klock II-1/+25
2019-07-08future-compat lint for newly handled cases of `#[structural_match]`.Felix S. Klock II-0/+6
2019-07-08Note that `eq_trait` denotes `trait PartialEq`, not `Eq`, so you don't have ↵Felix S. Klock II-0/+1
to go to trait def to double-check.
2019-07-07cli: make help output for -l and -L consistentTshepang Lekhonkhobe-3/+2
2019-07-07Rollup merge of #62042 - petrochenkov:macstab, r=matthewjasperMazdak Farrokhzad-92/+135
Support stability and deprecation checking for all macros RELNOTES: Deprecation attributes on macros now have effect. Fixes https://github.com/rust-lang/rust/issues/34079 Fixes https://github.com/rust-lang/rust/issues/49912 Unblocks https://github.com/rust-lang/rust/pull/62086 Unblocks https://github.com/rust-lang/rust/pull/61000
2019-07-07Support deprecation checking for macrosVadim Petrochenkov-63/+90
2019-07-07resolve: Use standard stability diagnostics for macrosVadim Petrochenkov-28/+32
2019-07-07Collect library features from non-exported macrosVadim Petrochenkov-1/+13
2019-07-07Remove some dummy dependenciesJohn Kåre Alsaker-34/+2
2019-07-07rustc: Remove `dylib` crate type from most rustc cratesAlex Crichton-2/+1
Now that procedural macros no longer link transitively to libsyntax, this shouldn't be needed any more! This commit is an experiment in removing all dynamic libraries from rustc except for librustc_driver itself. Let's see how far we can get with that!
2019-07-06in which we suggest anonymizing single-use lifetimes in pathsZack M. Davis-25/+56
2019-07-07Raise the default recursion limit to 128Simonas Kazlauskas-1/+1
2019-07-06Exit arm scopes correctly in the HIR CFGMatthew Jasper-6/+7
When a match evaluates to false we jump to the next arm, when we do so we need to make sure that we exit the scope for that arm.
2019-07-06Add arm ids for -Zunpretty=hir,identifiedMatthew Jasper-0/+3
2019-07-06`#[rustc_doc_only_macro]` -> `#[rustc_builtin_macro]`Vadim Petrochenkov-1/+1
2019-07-06remove another unused methodRalf Jung-13/+0
2019-07-06add assert_{bits,ptr}; document which methods we hope to get rid ofRalf Jung-0/+20
2019-07-06Cleanup liveness comment.Mazdak Farrokhzad-13/+6
2019-07-06Lowering: Fuse ExprKind::While logic + Cleanup.Mazdak Farrokhzad-85/+54
2019-07-06Enforce 'cond: bool' in while-expr + improve reachability diags.Mazdak Farrokhzad-5/+6
2019-07-06Remove ExprKind::While from HIR.Mazdak Farrokhzad-138/+77
2019-07-05Rollup merge of #62396 - RalfJung:miri-no-null, r=alexcrichtonMazdak Farrokhzad-11/+0
remove Scalar::is_null_ptr Comparing pointers should be done more carefully than that. With https://github.com/rust-lang/miri/pull/825, Miri does not need it any more and it is otherwise unused.
2019-07-05Rollup merge of #62168 - ljedrz:the_culmination_of_hiridification, r=ZoxcMazdak Farrokhzad-78/+64
The (almost) culmination of HirIdification It's finally over. This PR removes old `FIXME`s and renames some functions so that the `HirId` variant has the shorter name. All that remains (and rightfully so) is stuff in `resolve`, `save_analysis` and (as far as I can tell) in a few places where we can't replace `NodeId` with `HirId`.
2019-07-05Rollup merge of #62110 - nnethercote:improve-Ztime-passes, r=ZoxcMazdak Farrokhzad-13/+1
Improve -Ztime-passes Two improvements that make `-Ztime-passes` more useful. r? @Zoxc