about summary refs log tree commit diff
path: root/src/librustc
AgeCommit message (Collapse)AuthorLines
2019-11-07Rollup merge of #66076 - RalfJung:qpath, r=davidtwco,oli-obkYuki Okushi-0/+9
HIR docs: mention how to resolve method paths
2019-11-07Rollup merge of #66044 - RalfJung:uninit-lint, r=oli-obkYuki Okushi-0/+3
Improve uninit/zeroed lint * Also warn when creating a raw pointer with a NULL vtable. * Also identify `MaybeUninit::uninit().assume_init()` and `MaybeUninit::zeroed().assume_init()` as dangerous.
2019-11-07Rollup merge of #65794 - Centril:unimpl-internal, r=varkorYuki Okushi-3/+3
gate rustc_on_unimplemented under rustc_attrs Move `rustc_on_implemented` from the `on_implemented` gate to `rustc_attrs` as it is internal. Closes #29628 r? @varkor
2019-11-07Fix other broken linkYuki Okushi-1/+1
2019-11-06review commentsEsteban Küber-19/+22
2019-11-06Make doc comments cheaper with `AttrKind`.Nicholas Nethercote-19/+22
`AttrKind` is a new type with two variants, `Normal` and `DocComment`. It's a big performance win (over 10% in some cases) because `DocComment` lets doc comments (which are common) be represented very cheaply. `Attribute` gets some new helper methods to ease the transition: - `has_name()`: check if the attribute name matches a single `Symbol`; for `DocComment` variants it succeeds if the symbol is `sym::doc`. - `is_doc_comment()`: check if it has a `DocComment` kind. - `{get,unwrap}_normal_item()`: extract the item from a `Normal` variant; panic otherwise. Fixes #60935.
2019-11-06Remove unnecessary `Deref` impl for `Attribute`.Nicholas Nethercote-2/+2
This kind of thing just makes the code harder to read.
2019-11-06Fix markdown linkRalf Jung-1/+1
Co-Authored-By: Oliver Scherer <github35764891676564198441@oli-obk.de>
2019-11-06patterns_in_fns_without_body -> denyMazdak Farrokhzad-1/+1
2019-11-06ill_formed_attribute_input -> denyMazdak Farrokhzad-1/+1
2019-11-06nested_impl_trait -> errorMazdak Farrokhzad-18/+0
2019-11-06duplicate_macro_exports -> errorMazdak Farrokhzad-16/+0
2019-11-06parenthesized_params_in_types_and_modules -> errorMazdak Farrokhzad-41/+9
2019-11-06safe_extern_static -> errorMazdak Farrokhzad-12/+0
2019-11-06legacy_directory_ownership -> errorMazdak Farrokhzad-12/+0
2019-11-06legacy_ctor_visibility -> errorMazdak Farrokhzad-11/+0
2019-11-06Rebase falloutOliver Scherer-0/+3
2019-11-06gate rustc_on_unimplemented under rustc_attrsMazdak Farrokhzad-3/+3
2019-11-06Rollup merge of #66139 - euclio:pluralize, r=nagisaMazdak Farrokhzad-13/+13
use American spelling for `pluralize!`
2019-11-06Rollup merge of #66086 - RalfJung:smallvec, r=nagisaMazdak Farrokhzad-7/+7
bump smallvec to 1.0 This includes https://github.com/servo/rust-smallvec/pull/162, fixing an unsoundness in smallvec. See https://github.com/servo/rust-smallvec/pull/175 for the 1.0 release announcement. Cc @mbrubeck @emilio
2019-11-06Rollup merge of #65776 - nnethercote:rename-LocalInternedString-and-more, ↵Mazdak Farrokhzad-16/+16
r=estebank Rename `LocalInternedString` and more This PR renames `LocalInternedString` as `SymbolStr`, removes an unnecessary `impl` from it, improves comments, and cleans up some `SymbolStr` uses. r? @estebank
2019-11-06Rollup merge of #66115 - eddyb:global-meta-what, r=michaelwoeristerMazdak Farrokhzad-87/+3
rustc: remove "GlobalMetaData" dead code from hir::map::definitions. Spotted while refactoring uses of `DefIndex` and/or `LocalDefId`. r? @michaelwoerister
2019-11-06Rollup merge of #66106 - JOE1994:master, r=GuillaumeGomezMazdak Farrokhzad-1/+1
Fix typo in explanation of `E0080` Handling issue #66105 in Rust repo. `evaluate an constant expression` to `evaluate a constant expression`
2019-11-06Rollup merge of #66101 - estebank:break-tail-e0308, r=CentrilMazdak Farrokhzad-1/+1
Tweak type mismatch caused by break on tail expr When `break;` has a type mismatch because the `Destination` points at a tail expression with an obligation flowing from a return type, point at the return type. Fix #39968.
2019-11-06Rollup merge of #66027 - Mark-Simulacrum:panic-handler-query, r=alexcrichtonMazdak Farrokhzad-4/+5
Move has_panic_handler to query Moves us off of a global Once instead re-querying the lang item each time. The conditions on when we set it to true change a little (previously we'd make sure a few more lang items were `Some`) but I think they in practice don't matter, we won't compile later on if we don't have them.
2019-11-06Rollup merge of #66014 - dkadashev:47319-type-param-def-location, r=estebankMazdak Farrokhzad-4/+27
Show type parameter name and definition in type mismatch error messages Fixes #47319 r? estebank
2019-11-06Rollup merge of #65892 - pnkfelix:trim-special-derives, r=petrochenkovMazdak Farrokhzad-11/+1
Remove `PartialEq` and `Eq` from the `SpecialDerives`. Now that PR #65519 landed, this is the follow-on work of removing `PartialEq` and `Eq` from the set of `SpecialDerives` .
2019-11-05Tweak type mismatch caused by break on tail exprEsteban Küber-1/+1
When `break;` has a type mismatch because the `Destination` points at a tail expression with an obligation flowing from a return type, point at the return type. Fix #39968.
2019-11-05use American spelling for `pluralize!`Andy Russell-13/+13
2019-11-05rustc: remove "GlobalMetaData" dead code from hir::map::definitions.Eduard-Mihai Burtescu-87/+3
2019-11-05Review feedback: Remove more stuff! Simplify simplify simplify!Felix S. Klock II-3/+0
2019-11-05Remove `PartialEq` and `Eq` from the `SpecialDerives`.Felix S. Klock II-8/+1
2019-11-05Rollup merge of #66025 - petrochenkov:lohi, r=eddybPietro Albini-10/+0
`Span` cannot represent `span.hi < span.lo` So we can remove the corresponding checks from various code
2019-11-05Rollup merge of #66012 - nnethercote:dequery-trivial_dropck_outlives, ↵Pietro Albini-21/+6
r=michaelwoerister De-querify `trivial_dropck_outlives`. It's sufficiently simple and fast that memoizing it is a slight pessimization. r? @michaelwoerister
2019-11-05Auto merge of #65938 - eddyb:fn-abi-rename, r=oli-obkbors-14/+14
rustc_target: rename {Fn,Arg}Type to {Fn,Arg}Abi. I was trying to tweak the API of `FnType` (now `FnAbi`) and the name kept bothering me. `FnAbi` is to a function signature a bit like a layout is to a type, so the name still isn't perfect yet, but at least it doesn't have the misleading `Type` in it anymore. If this can't land I think I can continue my original refactor without it, so I'm not strongly attached to it. r? @nagisa cc @oli-obk
2019-11-05Fix typo in explanation of `E0080`Youngsuk Kim-1/+1
Handling issue #66105 in Rust repo. `evaluate an constant expression` to `evaluate a constant expression`
2019-11-04bump smallvec to 1.0Ralf Jung-7/+7
2019-11-04also explain how to resolve MethodCallRalf Jung-1/+6
2019-11-04Auto merge of #65835 - Mark-Simulacrum:lockless-lintbuffer, r=nikomatsakisbors-67/+56
Remove LintBuffer from Session This moves the `LintBuffer` from `Session` into the `Resolver`, where it is used until lowering is done and then consumed by early lint passes. This also happily removes the failure mode of buffering lints too late where it would have previously lead to ICEs; it is statically no longer possible to do so. I suspect that with a bit more work a similar move could be done for the lint buffer inside `ParseSess`, but this PR doesn't touch it (in part to keep itself small). The last commit is the "interesting" commit -- the ones before it don't work (though they compile) as they sort of prepare the various crates for the lint buffer to be passed in rather than accessed through Session.
2019-11-04QPath docs: mention how to resolve themRalf Jung-0/+4
2019-11-03Delete lint buffer from SessionMark Rousskov-58/+26
2019-11-03Move crate type checking laterMark Rousskov-1/+1
This allows us to directly pass in a lint buffer
2019-11-03Utilize Resolver lint buffer during HIR loweringMark Rousskov-8/+13
2019-11-03Migrate resolver over to internal lint bufferMark Rousskov-2/+23
2019-11-03Only permit taking buffered lints inside lint internalsMark Rousskov-1/+1
2019-11-03Remove unused get_any methodMark Rousskov-5/+0
2019-11-04Avoid hashing the key twice in `get_query()`.Nicholas Nethercote-3/+14
For a single-threaded parallel compiler, this reduces instruction counts across several benchmarks, by up to 2.8%. The commit also adds documentation about `Sharded`'s use of `FxHasher`.
2019-11-03add rustc_error(delay_span_bug_from_inside_query) attributeQuentin Boyer-0/+6
2019-11-03Make Emscripten unwinding use a valid type_infoAmanieu d'Antras-1/+1
This allows catch_panic to ignore C++ exceptions.
2019-11-03Auto merge of #65779 - kevgrasso:E0308highlight, r=estebankbors-6/+50
Highlight only relevant parts of type path in type errors Resolves #57413. Unfortunately the current Rust UI testing setup can't test that the correct colors are being used in a given output, so here's a screenshot of a small test program I wrote: ![image](https://user-images.githubusercontent.com/480789/67530063-f272af00-f68b-11e9-9f96-a211fc7666d4.png)