about summary refs log tree commit diff
path: root/src/librustc_resolve/lib.rs
AgeCommit message (Collapse)AuthorLines
2018-06-28Use `Ident`s for path segments in HIRVadim Petrochenkov-10/+8
2018-06-27Generate `DefId`s for the impl trait of `async` functionsOliver Schneider-4/+5
2018-06-23hygiene: Rename `MarkKind` to `Transparency`Vadim Petrochenkov-2/+2
Move `is_builtin` for `Mark` to a separate flag
2018-06-21PathParameters -> GenericArgs fixesTaylor Cramer-5/+5
2018-06-21Add path parameters to std_pathTaylor Cramer-5/+25
2018-06-21Async methodsTaylor Cramer-52/+25
2018-06-21async await desugaring and testsTaylor Cramer-3/+87
2018-06-20Address various commentsvarkor-19/+19
2018-06-20Use ParamBounds in WhereRegionPredicatevarkor-3/+3
2018-06-20Lift bounds into GenericParamvarkor-2/+2
2018-06-20Rename structures in astvarkor-6/+6
2018-06-20Refactor generic parameters in rustdoc/cleanvarkor-10/+5
2018-06-20Refactor ast::GenericParam as a structvarkor-29/+44
2018-06-20Rename ast::GenericParam and ast::GenericArgvarkor-5/+5
It's so confusing to have everything having the same name, at least while refactoring.
2018-06-18Auto merge of #51414 - oli-obk:impl_trait_type_def, r=pnkfelixbors-0/+1
Add existential type definitions Note: this does not allow creating named existential types, it just desugars `impl Trait` to a less (but still very) hacky version of actual `existential type` items. r? @nikomatsakis
2018-06-14create multiple HIR items for a use statementQuietMisdreavus-41/+10
2018-06-11Fix extern prelude failure in rustdocGuillaume Gomez-1/+6
2018-06-07Add existential type definitonsOliver Schneider-0/+1
2018-06-04Suggest braces when a struct literal needs themEsteban Küber-2/+32
When writing a struct literal in an expression that expects a block to be started afterwards (like an `if` statement), do not suggest using the same struct literal: ``` did you mean `S { /* fields * /}`? ``` Instead, suggest surrounding the expression with parentheses: ``` did you mean `(S { /* fields * /})`? ```
2018-05-31Add std/core to prelude if extern_prelude enabledMatt Brubeck-1/+11
Fixes #50605
2018-05-30resolve: Make sure indeterminate and inconsistent macro resolutions always ↵Vadim Petrochenkov-1/+1
generate errors
2018-05-26Add `Ident::as_str` helperVadim Petrochenkov-6/+6
2018-05-25Fix naming conventions for new lintsVadim Petrochenkov-1/+1
2018-05-24Auto merge of #50943 - oli-obk:cleanups, r=estebankbors-74/+3
impl Trait diagnostic/test cleanups
2018-05-23"crate-ify" paths that begin with a renamed crateNiko Matsakis-1/+3
2018-05-23pacify the mercilous tidyNiko Matsakis-1/+2
2018-05-23handle fully qualified paths properly when lintingNiko Matsakis-8/+48
fixes #50970
2018-05-22thread info about `CrateLint` through more deeplyNiko Matsakis-15/+63
2018-05-22add `Span` information into `Qself`Niko Matsakis-0/+21
2018-05-22Auto merge of #50969 - nikomatsakis:issue-50673-broken-migration-lint, ↵bors-27/+69
r=alexcrichton fix suggestions with nested paths Fixes #50673 cc @Manishearth @petrochenkov r? @alexcrichton
2018-05-22pacify the mercilous tidyNiko Matsakis-3/+21
2018-05-22pass down information about the root tree and use that to guide lintNiko Matsakis-27/+51
2018-05-21Improve the diagnostic around impl Trait <-> generic param mismatchOliver Schneider-74/+3
2018-05-20Auto merge of #50851 - eddyb:the-only-constant, r=nikomatsakisbors-31/+5
rustc: introduce {ast,hir}::AnonConst to consolidate so-called "embedded constants". Previously, constants in array lengths and enum variant discriminants were "merely an expression", and had no separate ID for, e.g. type-checking or const-eval, instead reusing the expression's. That complicated code working with bodies, because such constants were the only special case where the "owner" of the body wasn't the HIR parent, but rather the same node as the body itself. Also, if the body happened to be a closure, we had no way to allocate a `DefId` for both the constant *and* the closure, leading to *several* bugs (mostly ICEs where type errors were expected). This PR rectifies the situation by adding another (`{ast,hir}::AnonConst`) node around every such constant. Also, const generics are expected to rely on the new `AnonConst` nodes, as well (cc @varkor). * fixes #48838 * fixes #50600 * fixes #50688 * fixes #50689 * obsoletes #50623 r? @nikomatsakis
2018-05-19rustc: introduce {ast,hir}::AnonConst to consolidate so-called "embedded ↵Eduard-Mihai Burtescu-31/+5
constants".
2018-05-19Auto merge of #50763 - KyleStach1678:unused-loop-label, r=petrochenkovbors-2/+10
Add lint checks for unused loop labels Previously no warning was generated when a loop label was written out but never used (i.e. in a `break` or `continue` statement): ```rust fn main() { 'unused_label: loop {} } ``` would compile without complaint. This fix introduces `-W unused_loop_label`, which generates the following warning message for the above snippet: ``` warning: unused loop label --> main.rs:2:5 | 2 | 'unused_label: loop {} | ^^^^^^^^^^^^^ | = note: #[warn(unused_loop_label)] on by default ``` Fixes: #50751.
2018-05-19Auto merge of #50760 - petrochenkov:legimp, r=nikomatsakisbors-44/+14
Turn deprecation lint `legacy_imports` into a hard error Closes https://github.com/rust-lang/rust/issues/38260 The lint was introduced in Dec 2016, then made deny-by-default in Jun 2017 when crater run found 0 regressions caused by it. This lint requires some not entirely trivial amount of import resolution logic that (surprisingly or not) interacts with `feature(use_extern_macros)` (https://github.com/rust-lang/rust/issues/35896), so it would be desirable to remove it before stabilizing `use_extern_macros`. In particular, this PR fixes the failing example in https://github.com/rust-lang/rust/issues/50725 (but not the whole issue, `use std::panic::{self}` still can cause other undesirable errors when `use_extern_macros` is enabled).
2018-05-18Reimplement unused_labels lint as a compiler builtin in the resolverKyle Stachowicz-2/+10
2018-05-17Turn some functions from `token.rs` into methods on `Ident`Vadim Petrochenkov-2/+1
2018-05-17Auto merge of #50665 - alexcrichton:fix-single-item-path-warnings, r=oli-obkbors-27/+80
rustc: Fix `crate` lint for single-item paths This commit fixes recommending the `crate` prefix when migrating to 2018 for paths that look like `use foo;` or `use {bar, baz}` Closes #50660
2018-05-16Make the compiler support the label-break-value featureest31-0/+2
No error checking or feature gating yet
2018-05-15rustc: Fix `crate` lint for single-item pathsAlex Crichton-27/+80
This commit fixes recommending the `crate` prefix when migrating to 2018 for paths that look like `use foo;` or `use {bar, baz}` Closes #50660
2018-05-15Turn deprecation lint `legacy_imports` into a hard errorVadim Petrochenkov-44/+14
2018-05-04Make extern_absolute_paths only work on the new editionManish Goregaokar-3/+2
2018-05-02Auto merge of #50355 - petrochenkov:50187, r=oli-obkbors-12/+9
Fix an unresolved import issue with enabled `use_extern_macros` This is a kinda ugly special-purpose solution that will break if we suddenly add a fourth namespace, but I hope to come up with something more general if I get to import resolution refactoring this summer. Fixes https://github.com/rust-lang/rust/issues/50187 thus removing a blocker for stabilization of `use_extern_macros`
2018-05-01resolve (cleanup): Get rid of `Option` in `PerNS`Vadim Petrochenkov-12/+9
2018-04-27Add one more prelude layer for extern crate names passed with `--extern`Vadim Petrochenkov-7/+29
2018-04-25Fix crate:: in local pathsManish Goregaokar-4/+5
2018-04-20mention that extern absolute paths should gate on rust 2018Manish Goregaokar-0/+2
2018-04-20Add suggestion to lintManish Goregaokar-3/+6