about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2019-09-16ci: rename Gankro to Gankra in toolstatePietro Albini-1/+1
2019-09-16ci: ensure all tool maintainers are assignable on issuesPietro Albini-0/+67
GitHub only allows people explicitly listed as collaborators on the repository or who commented on the issue/PR to be assignees, failing to create the issue if non-assignable people are assigned. This adds an extra check on CI to make sure all the people listed as tool maintainers can be assigned to toolstate issues. The check won't be executed on PR builds due to the lack of a valid token.
2019-09-16Auto merge of #64383 - pcpthm:btreeset-size-hint, r=dtolnaybors-22/+33
Improve BTreeSet::Intersection::size_hint A comment on `IntersectionInner` mentions `small_iter` should be smaller than `other_iter` but this condition is broken while iterating because those two iterators can be consumed at a different rate. I added a test to demonstrate this situation. <del>I made `small_iter.len() < other_iter.len()` always true by swapping two iterators when that condition became false. This change affects the return value of `size_hint`. The previous result was also correct but this new version always returns smaller upper bound than the previous version.</del> I changed `size_hint` to taking minimum of both lengths of iterators and renamed fields to `a` and `b` to match `Union` iterator.
2019-09-16Improve BTreeSet::Intersection::size_hintpcpthm-22/+33
The commented invariant that an iterator is smaller than other iterator was violated after next is called and two iterators are consumed at different rates.
2019-09-16Auto merge of #64487 - Xanewok:update-rls, r=jonas-schievinkbors-0/+0
Update RLS Fixes the toolstate. Closes #64480 r? @jonas-schievink
2019-09-15Auto merge of #64491 - Centril:rollup-21wkl69, r=Centrilbors-101/+140
Rollup of 3 pull requests Successful merges: - #63872 (Document platform-specific behavior of the iterator returned by std::fs::read_dir) - #64250 (save-analysis: Nest typeck tables when processing functions/methods) - #64472 (Don't mark expression with attributes as not needing parentheses) Failed merges: r? @ghost
2019-09-15Rollup merge of #64472 - Mark-Simulacrum:unused-parens-attr, r=varkorMazdak Farrokhzad-20/+25
Don't mark expression with attributes as not needing parentheses This is not perfectly correct as `#[attr] (5)` will still not lint, but it does seem good enough, in particular as the parentheses in that case are not unambiguously incorrect; I might personally prefer to see them for clarity. Fixes https://github.com/rust-lang/rust/issues/43279.
2019-09-15Rollup merge of #64250 - Xanewok:save-analysis-assoc-nested, r=varkorMazdak Farrokhzad-80/+113
save-analysis: Nest typeck tables when processing functions/methods Fixes an issue where we did not nest tables correctly when resolving associated types in formal argument/return type positions. This was the minimized reproduction case that I tested the fix on: ```rust pub trait Trait { type Assoc; } pub struct A; pub fn func() { fn _inner1<U: Trait>(_: U::Assoc) {} fn _inner2<U: Trait>() -> U::Assoc { unimplemented!() } impl A { fn _inner1<U: Trait>(self, _: U::Assoc) {} fn _inner2<U: Trait>(self) -> U::Assoc { unimplemented!() } } } ``` using `debug_assertions`-enabled rustc and by additionally passing `-Zsave-analysis`. Unfortunately the original assertion fired is a *debug* one and from what I can tell we don't run the tests with these on, so I'm not adding a test here. If I missed it and there is a way to run tests with these on, I'd love to add a test case for this. Closes #63663 Closes #50328 Closes #43982
2019-09-15Rollup merge of #63872 - marmistrz:readdir, r=jonas-schievinkMazdak Farrokhzad-1/+2
Document platform-specific behavior of the iterator returned by std::fs::read_dir
2019-09-15Auto merge of #64474 - Mark-Simulacrum:permit-err-overlap, r=matthewjasperbors-0/+38
Permit impls referencing errors to overlap Fixes #43400; previously this would emit an overlapping impls error, but no longer does.
2019-09-15Update RLSIgor Matuszewski-0/+0
2019-09-15Permit impls referencing errors to overlapMark Rousskov-0/+38
2019-09-15Auto merge of #64483 - petrochenkov:expectattr2, r=Centrilbors-163/+169
resolve: Tweak some "cannot find" wording for macros
2019-09-15resolve: Remove `!` from "cannot find" diagnostics for macrosVadim Petrochenkov-43/+42
2019-09-15resolve: Tweak "cannot find" wording for attributesVadim Petrochenkov-121/+128
2019-09-15Auto merge of #64469 - matthewjasper:increase-hygiene-use, r=petrochenkovbors-153/+161
Cleanup handling of hygiene for built-in macros This makes most identifiers generated by built-in macros use def-site hygiene, not only the ones that previously used gensyms. * `ExtCtxt::ident_of` now takes a `Span` and is preferred to `Ident::{from_str, from_str_and_span}` * Remove `Span::with_legacy_ctxt` * `assert` now uses call-site hygiene because it needs to resolve `panic` unhygienically. * `concat_idents` now uses call-site hygiene because it wouldn't be very useful with def-site hygiene. * everything else is moved to def-site hygiene r? @petrochenkov
2019-09-15Remove `with_legacy_ctxt`Matthew Jasper-34/+44
2019-09-15Give more `Idents` spansMatthew Jasper-68/+72
2019-09-15Avoid some unnecessary `&str` to `Ident` conversionsMatthew Jasper-18/+17
2019-09-15Prefer `Symbol` to `Ident` when there's no sensible `Span`Matthew Jasper-33/+28
2019-09-15Auto merge of #64478 - Centril:rollup-bnt51w1, r=Centrilbors-47/+88
Rollup of 5 pull requests Successful merges: - #64457 (def_collector: Do not ICE on attributes on unnamed fields) - #64463 (resolve: Tweak some expected/found wording) - #64471 (Warn on no_start, crate_id attribute use) - #64473 (Use try_fold instead of manually carrying an accumulator) - #64475 (simplify the initialization) Failed merges: r? @ghost
2019-09-15Rollup merge of #64475 - guanqun:use-same-name, r=CentrilMazdak Farrokhzad-1/+1
simplify the initialization
2019-09-15Rollup merge of #64473 - spastorino:use-try-fold, r=CentrilMazdak Farrokhzad-4/+5
Use try_fold instead of manually carrying an accumulator r? @RalfJung
2019-09-15Rollup merge of #64471 - Mark-Simulacrum:warn-depr-attr, r=CentrilMazdak Farrokhzad-15/+37
Warn on no_start, crate_id attribute use These attributes are now deprecated; they don't have any use anymore. `no_start` stopped being applicable in 3ee916e50bd86768cb2a9141f9b2c52d2601b412 as part of #18967. Ideally we would've removed it pre-1.0, but since that didn't happen let's at least mark it deprecated. `crate_id` was renamed to `crate_name` in 50ee1ec1b4f107122d8037ac7b0b312afa6eb0ac as part of #15319. Ideally we would've followed that up with a removal of crate_id itself as well, but that didn't happen; this PR finally marks it as deprecated at least. Fixes https://github.com/rust-lang/rust/issues/43142 and resolves https://github.com/rust-lang/rust/issues/43144.
2019-09-15Rollup merge of #64463 - petrochenkov:expectattr, r=CentrilMazdak Farrokhzad-6/+7
resolve: Tweak some expected/found wording
2019-09-15Rollup merge of #64457 - petrochenkov:macunfield, r=matthewjasperMazdak Farrokhzad-21/+38
def_collector: Do not ICE on attributes on unnamed fields The primary issue here is that the expansion infra needs to visit a field in isolation, and fields don't know their own indices during expansion, so they have to be kept in some other place (e.g. `struct Definitions`). Fixes https://github.com/rust-lang/rust/issues/64385
2019-09-15Auto merge of #60584 - jonas-schievink:ice-panic-hook, r=oli-obkbors-93/+115
Use `panic::set_hook` to print the ICE message This allows custom frontends and backends to override the hook with their own, for example to point people to a different issue tracker. ICE messages are printed in a slightly different order now. Nightly prints: ``` thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', src/libcore/option.rs:347:21 note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace. error: aborting due to 2 previous errors Some errors have detailed explanations: E0277, E0658. For more information about an error, try `rustc --explain E0277`. error: internal compiler error: unexpected panic note: the compiler unexpectedly panicked. this is a bug. note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports note: rustc 1.36.0-nightly (08bfe1612 2019-05-02) running on x86_64-unknown-linux-gnu ``` After this PR, rustc prints: ``` thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', src/libcore/option.rs:347:21 note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace. error: internal compiler error: unexpected panic note: the compiler unexpectedly panicked. this is a bug. note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports note: rustc 1.36.0-dev running on x86_64-unknown-linux-gnu error: aborting due to 2 previous errors Some errors have detailed explanations: E0277, E0658. For more information about an error, try `rustc --explain E0277`. ```
2019-09-14Warn on no_start, crate_id attribute useMark Rousskov-15/+37
These attributes are now deprecated; they don't have any use anymore.
2019-09-15simply the initializationGuanqun Lu-1/+1
2019-09-14Use try_fold instead of manually carrying an accumulatorSantiago Pastorino-4/+5
2019-09-14Don't mark expression with attributes as not needing parenthesesMark Rousskov-20/+25
This is not perfectly correct as `#[attr] (5)` will still not lint, but it does seem good enough, in particular as the parentheses in that case are not unambiguously incorrect.
2019-09-15save-analysis: Process bounds in impl trait only in argument positionIgor Matuszewski-4/+26
2019-09-15save-analysis: Deduplicate lookup_{d,r}ef_id functionsIgor Matuszewski-11/+8
2019-09-14Try to fix the test output normalizationJonas Schievink-15/+15
2019-09-14Rollup merge of #64462 - petrochenkov:remattr, r=CentrilMazdak Farrokhzad-161/+63
feature_gate: Remove dead code from attribute checking https://github.com/rust-lang/rust/pull/63468 is merged, so all attributes go through name resolution now, so we can remove code that previously performed some checks for attributes not going through resolution.
2019-09-14Rollup merge of #64406 - Mark-Simulacrum:error-unknown-intrinsic, r=CentrilMazdak Farrokhzad-97/+186
Ban non-extern rust intrinsics Intrinsics can only be defined by the compiler. Fixes https://github.com/rust-lang/rust/issues/36979
2019-09-14Rollup merge of #64290 - Mark-Simulacrum:span-no-main, r=estebankMazdak Farrokhzad-126/+176
Provide a span if main function is not present in crate Unfortunately, the diagnostic machinery does not cope well with an empty span which can happen if the crate is empty, in which case we merely set a spanless note. Tests are already updated for this change, so a dedicated test is not added. Resolves #36561.
2019-09-14Rollup merge of #61797 - Thomasdezeeuw:stablise-weak_ptr_eq, r=RalfJungMazdak Farrokhzad-11/+8
Stabilise weak_ptr_eq Implemented in #55987. Closes #55981.
2019-09-14resolve: Tweak some expected/found wordingVadim Petrochenkov-6/+7
2019-09-14feature_gate: Eliminate `check::Context`Vadim Petrochenkov-59/+51
Use `PostExpansionVisitor` directly instead
2019-09-14feature_gate: Merge various attribute gating functionsVadim Petrochenkov-103/+54
2019-09-14feature_gate: Remove dead code from attribute checkingVadim Petrochenkov-51/+10
Same checks are performed during name resolution, and all attributes go through name resolution now
2019-09-14Ban non-extern rust intrinsicsMark Rousskov-97/+186
Intrinsics can only be defined by the compiler.
2019-09-14Provide a span if main function is not present in crateMark Rousskov-126/+176
Unfortunately, the diagnotic machinery does not cope well with an empty span which can happen if the crate is empty, in which case we merely set a spanless note.
2019-09-14Rollup merge of #64439 - 12101111:fix-owned-box, r=CentrilMazdak Farrokhzad-26/+47
fix #64430, confusing `owned_box` error message in no_std build Fixes #64430
2019-09-14Rollup merge of #64435 - eddyb:arguments-against-arg, r=rkruppeMazdak Farrokhzad-110/+98
codegen: use "_N" (like for other locals) instead of "argN", for argument names. Based on #64408 (second commit is new), fixing something I mentioned in #64408 (which turned to be an immediate blocker for unifying relevant codepaths). Closes #64408 (by containing it). r? @rkruppe
2019-09-14Rollup merge of #64431 - pnkfelix:issue-63479-fnptr-is-structural-match, ↵Mazdak Farrokhzad-1/+178
r=varkor fn ptr is structural match Make fn ptr always structural match, regardless of whether the formal parameter types or return type are. Fix #63479.
2019-09-14Rollup merge of #64425 - guanqun:typo-fix, r=matthewjasperMazdak Farrokhzad-1/+1
typo fix
2019-09-14Rollup merge of #64422 - ollie27:error_index_generator_stringify, ↵Mazdak Farrokhzad-1/+1
r=Mark-Simulacrum Remove raw string literal quotes from error index descriptions The error index has unnecessary `r##"` and `"##` around the descriptions from #63721. Removing the `stringify` call removes them. r? @Mark-Simulacrum
2019-09-14Rollup merge of #64420 - nnethercote:inline-mark_neighbours_as_waiting_from, ↵Mazdak Farrokhzad-4/+13
r=Mark-Simulacrum Inline `mark_neighbours_as_waiting_from`. This function is very hot, doesn't get inlined because it's recursive, and the function calls are significant. This commit splits it into inlined and uninlined variants, and uses the inlined variant for the hot call site. This wins several percent on a few benchmarks. r? @nikomatsakis