summary refs log tree commit diff
path: root/src/librustc
AgeCommit message (Collapse)AuthorLines
2018-06-01change `PointerKind::Implicit` to a noteNiko Matsakis-55/+81
`PointerKind` is included in `LoanPath` and hence forms part of the equality check; this led to having two unequal paths that both represent `*x`, depending on whether the `*` was inserted automatically or explicitly. Bad mojo. The `note` field, in contrast, is intended more-or-less primarily for this purpose of adding extra data.
2018-04-30Warn on pointless `#[derive]` in more placesAustin Bonander-1/+2
This fixes the regression in #49934 and ensures that unused `#[derive]`s on statements, expressions and generic type parameters survive to trip the `unused_attributes` lint. For `#[derive]` on macro invocations it has a hardcoded warning since linting occurs after expansion. This also adds regression testing for some nodes that were already warning properly. closes #49934
2018-04-28Don't ICE on tuple struct ctor with incorrect arg countEsteban Küber-0/+6
2018-04-27improved debug outputNiko Matsakis-3/+9
2018-04-26Allow variant discriminant initializers to refer to other initializers of ↵Oliver Schneider-17/+23
the same enum
2018-04-23Auto merge of #50182 - alexcrichton:beta-next, r=alexcrichtonbors-0/+9
[beta] Another round of backports This is a backport of: * https://github.com/rust-lang/rust/pull/50039 * https://github.com/rust-lang/rust/pull/50121
2018-04-23Improve assertion in Query::force().Michael Woerister-1/+10
2018-04-21Bring back old fallback semantics: Without feature(never_type), fallback to ↵Felix S. Klock II-0/+8
`()`, not `!`. Note that this commit, since it is trying to be minimal in order to ease backporting to the beta and release channels, does *not* include the old future-proofing warnings that we used to have associated with such fallback to `()`; see discussion at this comment: https://github.com/rust-lang/rust/issues/49691#issuecomment-381266730
2018-04-21Revert stabilization of `feature(never_type)`.Felix S. Klock II-0/+1
This commit is just covering the feature gate itself and the tests that made direct use of `!` and thus need to opt back into the feature. A follow on commit brings back the other change that motivates the revert: Namely, going back to the old rules for falling back to `()`.
2018-04-20Paper over a bug on masterAlex Crichton-2/+4
This commit papers over #49889 (introducing a fixme pointing at #50125) for a bug that was introduced with #49695. This workaround is taken from #49891.
2018-04-20Properly handle ranges of signed enums using both extremums (fixes #49973)Anthony Ramine-5/+6
2018-04-20Disallow `impl Trait` in unsupported positionShotaro Yamada-17/+36
2018-04-20Print region in case of ICEShotaro Yamada-1/+1
2018-04-20Fix ICE with impl TraitShotaro Yamada-2/+6
2018-04-20do not propagate `Err` when determing causal infoNiko Matsakis-19/+43
In intercrate mode, if we determine that a particular `T: Trait` is unknowable, we sometimes also go and get extra causal information. An errant `?` was causing us to propagate an error found in that process out as if `T: Trait` was not unknowable but rather not provable. This led to an ICE.
2018-04-20make mem-categorization use adjusted type for patternsNiko Matsakis-4/+33
Fixes #49631
2018-04-20Use InternedString instead of Symbol for type parameters.Michael Woerister-15/+15
2018-04-20Rollup merge of #50046 - michaelwoerister:backport-no-debug, r=alexcrichtonkennytm-0/+1
Backport of #49904 See #49904.
2018-04-18Add #[no_debug] to trans_fn_attrs() query.Michael Woerister-0/+1
2018-04-17Don't abort const eval due to long running evals, just warnOliver Schneider-8/+0
2018-04-17Get rid of redundant `HashSet`Oliver Schneider-17/+16
2018-04-17Stop referring to statics' AllocIds directlyOliver Schneider-40/+23
2018-04-17Don't recurse into allocations, use a global table insteadOliver Schneider-99/+108
2018-04-11[incremental] Hash `Allocation`sShotaro Yamada-1/+1
2018-04-01Auto merge of #49522 - mbrubeck:fs_read, r=SimonSapinbors-1/+2
Rename fs::read_string to read_to_string and stabilize As approved in https://github.com/rust-lang/rust/issues/46588#issuecomment-377530365 Closes #46588.
2018-03-31Auto merge of #49201 - Phlosioneer:add-trivial-size-hints, r=SimonSapinbors-0/+42
Implement some trivial size_hints for various iterators This also implements ExactSizeIterator where applicable. Addresses most of the Iterator traits mentioned in #23708. I intend to do more, but I don't want to make the PR too large.
2018-03-30Rename fs::read_string to read_to_string and stabilizeMatt Brubeck-1/+2
2018-03-30Auto merge of #49424 - oli-obk:stable_allocid_hash, r=michaelwoeristerbors-12/+22
Fix stable hashing of AllocIds r? @michaelwoerister fixes #49081
2018-03-29Auto merge of #49313 - sgrif:sg-revert-stuff, r=nikomatsakisbors-185/+67
Remove universes from `ty::ParamEnv` This change was never meant to land. #48407 takes an alternate approach. However, that PR is now blocked on some issues with canonicalization, and rebasing these reverts gets harder each time, so let's just get this bit out of the way now. r? @nikomatsakis
2018-03-29Auto merge of #49291 - tejom:check-for-known-but-incorrect-attributes, ↵bors-9/+72
r=petrochenkov Check for known but incorrect attributes fixes #43988 - Change nested_visit_map so it will recursively check functions - Add visit_stmt and visit_expr for impl Visitor for CheckAttrVisitor and check for incorrect inline and repr attributes on staements and expressions - Add regression test for issue #43988
2018-03-29Stabilize underscore lifetimesTaylor Cramer-1/+1
2018-03-28Auto merge of #49394 - cramertj:stable-match-bindings, r=nikomatsakisbors-60/+1
Stabilize match_default_bindings This includes a submodule update to rustfmt in order to allow a stable feature declaration. r? @nikomatsakis cc https://github.com/rust-lang/rust/issues/42640 Many of the tests this PR touches are merely testing the current lack of desired future behavior around https://github.com/rust-lang/rust/issues/44849 and https://github.com/rust-lang/rust/issues/44848 (cc @tschottdorf). I noticed the bullets for those items were checked on the tracking issue-- I've unchecked them, as they don't appear to have been completed and I don't see any comments indicating that we don't want to pursue them further. Still, I think it's fine to stabilize the current behavior, as I think expanding it in the future should be backwards-compatible.
2018-03-28Auto merge of #49019 - phil-opp:target-spec, r=pnkfelixbors-11/+26
Introduce a TargetTriple enum to support absolute target paths This PR replaces target triple strings with a `TargetTriple` enum, which represents either a target triple or a path to a JSON target file. The path variant is used if the `--target` argument has a `.json` extension, else the target triple variant is used. The motivation of this PR is support for absolute target paths to avoid the need for setting the `RUST_TARGET_PATH` environment variable (see rust-lang/cargo#4905 for more information). For places where some kind of triple is needed (e.g. in the sysroot folder), we use the file name (without extension). For compatibility, we keep the old behavior of searching for a file named `$(target_triple).json` in `RUST_TARGET_PATH` for non-official target triples.
2018-03-28Stabilize match_default_bindingsTaylor Cramer-60/+1
This includes a submodule update to rustfmt in order to allow a stable feature declaration.
2018-03-28Fix stable hashing of AllocIdsOliver Schneider-12/+22
2018-03-28Auto merge of #49383 - nox:scalarpair, r=eddybbors-4/+15
Allow niche-filling dataful variants to be represented as a ScalarPair r? @eddyb
2018-03-28Rollup merge of #49426 - lukaslueg:patch-1, r=kennytmkennytm-77/+154
Update CONTRIBUTING.md The current link is a 404, just link to the main repo page
2018-03-27Add extra test for expressions and fix typo in messagematthew-1/+1
2018-03-27Auto merge of #49202 - csmoe:trait_engine, r=nikomatsakisbors-77/+154
Introduce trait engine address #48895 step 1: introduce trait engine
2018-03-27Rollup merge of #49369 - petrochenkov:rprint, r=oli-obkkennytm-2/+6
Fix pretty-printing for raw identifiers
2018-03-26Remove an unnecessary/incorrect match in the expression check functionmatthew-12/+2
2018-03-26Auto merge of #49053 - alexcrichton:fail-if-build-cargo-twice, r=Mark-Simulacrumbors-0/+1
rustbuild: Fail the build if we build Cargo twice This commit updates the `ToolBuild` step to stream Cargo's JSON messages, parse them, and record all libraries built. If we build anything twice (aka Cargo) it'll most likely happen due to dependencies being recompiled which is caught by this check.
2018-03-27Fix pretty-printing for raw identifiersVadim Petrochenkov-2/+6
2018-03-26rustbuild: Fail the build if we build Cargo twiceAlex Crichton-0/+1
This commit updates the `ToolBuild` step to stream Cargo's JSON messages, parse them, and record all libraries built. If we build anything twice (aka Cargo) it'll most likely happen due to dependencies being recompiled which is caught by this check.
2018-03-26Auto merge of #49101 - mark-i-m:stabilize_i128, r=nagisabors-2/+1
Stabilize 128-bit integers :tada: cc #35118 EDIT: This should be merged only after the following have been merged: - [x] https://github.com/rust-lang-nursery/compiler-builtins/pull/236 - [x] https://github.com/rust-lang/book/pull/1230
2018-03-26Canonicalize pathsPhilipp Oppermann-2/+8
2018-03-26Introduce a TargetTriple enum to support absolute target pathsPhilipp Oppermann-10/+19
2018-03-26Check for known but incorrect attributesmatthew-9/+82
- Change nested_visit_map so it will recusively check functions - Add visit_stmt and visit_expr for impl Visitor for CheckAttrVisitor and check for incorrect inline and repr attributes on staements and expressions - Add regression test for isssue #43988
2018-03-26Allow niche-filling dataful variants to be represented as a ScalarPairAnthony Ramine-4/+15
2018-03-26Stabilize i128 feature tooMark Mansi-2/+1