summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Auto merge of #57047 - euclio:field-structured-suggestions, r=estebankbors2018-12-3118-35/+50
|\ | | | | | | | | | | use structured suggestions for nonexistent fields r? @estebank
| * use structured suggestions for nonexistent fieldsAndy Russell2018-12-3118-35/+50
| |
* | Auto merge of #57220 - quark-zju:mcount, r=estebankbors2018-12-313-1/+23
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add `-Z instrument-mcount` This flag inserts `mcount` function call to the beginning of every function after inline processing. So tracing tools like uftrace [1] (or ftrace for Linux kernel modules) have a chance to examine function calls. It is similar to the `-pg` flag provided by gcc or clang, but without generating a `__gmon_start__` function for executables. If a program runs without being traced, no `gmon.out` will be written to disk. Under the hood, it simply adds `"instrument-function-entry-inlined"="mcount"` attribute to every function. The `post-inline-ee-instrument` LLVM pass does the actual job. [1]: https://github.com/namhyung/uftrace
| * | Add `-Z instrument-mcount`Jun Wu2018-12-303-1/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This flag inserts `mcount` function call to the beginning of every function after inline processing. So tracing tools like uftrace [1] (or ftrace for Linux kernel modules) have a chance to examine function calls. It is similar to the `-pg` flag provided by gcc or clang, but without generating a `__gmon_start__` function for executables. If a program runs without being traced, no `gmon.out` will be written to disk. Under the hood, it simply adds `"instrument-function-entry-inlined"="mcount"` attribute to every function. The `post-inline-ee-instrument` LLVM pass does the actual job. [1]: https://github.com/namhyung/uftrace
* | | Auto merge of #57061 - Zoxc:graph-refactor, r=michaelwoeristerbors2018-12-313-187/+193
|\ \ \ | | | | | | | | | | | | | | | | | | | | Group dep node data into a single structure r? @michaelwoerister
| * | | Address commentsJohn Kåre Alsaker2018-12-312-12/+14
| | | |
| * | | Use `entry` API to avoid double lookup when interning dep nodesJohn Kåre Alsaker2018-12-311-30/+39
| | | |
| * | | Group dep node data into a single structureJohn Kåre Alsaker2018-12-313-170/+165
| | | |
* | | | Auto merge of #57208 - estebank:issue-57198, r=petrochenkovbors2018-12-315-2/+30
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | Do not complain about missing crate named as a keyword Fix #57198.
| * | | Address review comments: Remove new `PathResult` variantEsteban Küber2018-12-303-15/+6
| | | |
| * | | Do not complain about missing crate named as a keywordEsteban Küber2018-12-296-5/+42
| | | |
* | | | Auto merge of #57044 - varkor:E0512-equal-type, r=matthewjasperbors2018-12-3127-123/+149
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add specific diagnostic when attempting to transmute between equal generic types Also clarifies the wording of E0512. Fixes https://github.com/rust-lang/rust/issues/49793.
| * | | | Fix variable string size problem in transmute testvarkor2018-12-302-3/+3
| | | | |
| * | | | Add specific diagnostic for transmuting between equal associated typesvarkor2018-12-283-0/+24
| | | | |
| * | | | Clarify wording of E0512varkor2018-12-2825-121/+123
| | | | |
* | | | | Auto merge of #57035 - Zoxc:query-pref9, r=michaelwoeristerbors2018-12-311-23/+34
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Uninline some debugging code and use unlikely! macro r? @michaelwoerister
| * | | | | Uninline some debugging code and use unlikely! macroJohn Kåre Alsaker2018-12-213-23/+39
| | | | | |
* | | | | | Auto merge of #57213 - matthiaskrgr:clippy_submodule_upd, r=oli-obkbors2018-12-301-8/+8
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | submodules: update clippy from f7bdf500 to 39bd8449 Fixes clippy toolstate Changes: ```` UI test cleanup: Extract iter_skip_next from methods.rs Update test output after rebase Remove false negatives from known problems Implement use_self for tuple structs Document known problems rustup https://github.com/rust-lang/rust/pull/56225/ Remove unnecessary `use` statements after `cargo fix` Apply cargo fix --edition-idioms fixes Use match ergonomics for booleans lint Use match ergonomics for block_in_if_condition lint Use match ergonomics for bit_mask lint Use match ergonomics for attrs lint Use match ergonomics for assign_ops lint Use match ergonomics for artithmetic lint Use match ergonomics for approx_const lint Remove crate:: prefixes from crate paths Support array indexing expressions in unused write to a constant Mark writes to constants as side-effect-less Update README local run command to remove syspath Remove unsafe from consts clippy lints Fix formatting Merge new_without_default_derive into new_without_default Only print out question_mark lint when it actually triggered Add failing test Reinserted commata Recomend `.as_ref()?` in certain situations Deduplicate some code? ```` r? @oli-obk or anyone else
| * | | | | | submodules: update clippy from f7bdf500 to 39bd8449Matthias Krüger2018-12-301-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes: ```` UI test cleanup: Extract iter_skip_next from methods.rs Update test output after rebase Remove false negatives from known problems Implement use_self for tuple structs Document known problems rustup https://github.com/rust-lang/rust/pull/56225/ Remove unnecessary `use` statements after `cargo fix` Apply cargo fix --edition-idioms fixes Use match ergonomics for booleans lint Use match ergonomics for block_in_if_condition lint Use match ergonomics for bit_mask lint Use match ergonomics for attrs lint Use match ergonomics for assign_ops lint Use match ergonomics for artithmetic lint Use match ergonomics for approx_const lint Remove crate:: prefixes from crate paths Support array indexing expressions in unused write to a constant Mark writes to constants as side-effect-less Update README local run command to remove syspath Remove unsafe from consts clippy lints Fix formatting Merge new_without_default_derive into new_without_default Only print out question_mark lint when it actually triggered Add failing test Reinserted commata Recomend `.as_ref()?` in certain situations Deduplicate some code? ````
* | | | | | | Auto merge of #57205 - petrochenkov:extrecov, r=estebankbors2018-12-3013-47/+74
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | Improve error recovery for some built-in macros Fixes https://github.com/rust-lang/rust/issues/55897
| * | | | | | Improve error recovery for some built-in macrosVadim Petrochenkov2018-12-3013-47/+74
| | | | | | |
* | | | | | | Auto merge of #57204 - czipperz:ord_docs_must_agree, r=sfacklerbors2018-12-301-3/+5
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make std::cmp::Ord documentation specify what it means to agree with ParitalEq Resolves #57157
| * | | | | | | Specify criterion for PartialOrdCzipperz2018-12-291-2/+3
| | | | | | | |
| * | | | | | | Make std::cmp::Ord documentation specify what it means to agree with PartialEqCzipperz2018-12-291-3/+4
| | | | | | | |
* | | | | | | | Auto merge of #57158 - estebank:as-ref, r=zackmdavisbors2018-12-305-61/+172
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Suggest `.as_ref()` when appropriate for `Option` and `Result` Fix #55198.
| * | | | | | | | Use `same_type` instead of duplicating logicEsteban Küber2018-12-292-33/+26
| | | | | | | | |
| * | | | | | | | Suggest `.as_ref()` when appropriate for `Option` and `Result`Esteban Küber2018-12-284-47/+165
| | | | | | | | |
* | | | | | | | | Auto merge of #57195 - czipperz:mention_ToString_in_std_fmt_docs, r=SimonSapinbors2018-12-302-0/+9
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mention ToString in std::fmt docs I believe this should be added because `x.to_string()` is preferred over `format!("{}", x)` as the recommended way to convert a value to a string. `std::fmt` and the `format` macro is where people look for documentation about this, and thus we should include references to this preferred functions there. Resolves #55065
| * | | | | | | | | Mention ToString in std::fmt docsCzipperz2018-12-292-0/+9
| | |/ / / / / / / | |/| | | | | | |
* | | | | | | | | Auto merge of #57185 - petrochenkov:impice4, r=estebankbors2018-12-306-26/+33
|\ \ \ \ \ \ \ \ \ | |_|_|_|_|_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | resolve: Fix one more ICE in import validation So if you have an unresolved import ```rust mod m { use foo::bar; } ``` error recovery will insert a special item with `Def::Err` definition into module `m`, so other things depending on `bar` won't produce extra errors. The issue was that erroneous `bar` was overwriting legitimate `bar`s coming from globs, e.g. ```rust mod m { use baz::*; // imports real existing `bar` use foo::bar; } ``` causing some unwanted diagnostics talking about "unresolved items", and producing inconsistent resolutions like https://github.com/rust-lang/rust/issues/57015. This PR stops overwriting real successful resolutions with `Def::Err`s. Fixes https://github.com/rust-lang/rust/issues/57015
| * | | | | | | | resolve: Never override real bindings with `Def::Err`s from error recoveryVadim Petrochenkov2018-12-296-26/+33
| | | | | | | | |
* | | | | | | | | Auto merge of #56843 - csmoe:non-copy, r=davidtwcobors2018-12-2923-95/+94
|\ \ \ \ \ \ \ \ \ | |_|_|_|_|_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a note describing the type of the non-Copy moved variable Closes #56654 r?@davidtwco
| * | | | | | | | add non-copy note to stderrcsmoe2018-12-2920-45/+62
| | | | | | | | |
| * | | | | | | | retrieve ty info from place_tycsmoe2018-12-275-52/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | describe index with _
* | | | | | | | | Auto merge of #56225 - alexreg:type_alias_enum_variants, r=petrochenkovbors2018-12-29111-758/+1605
|\ \ \ \ \ \ \ \ \ | |_|_|_|_|/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement RFC 2338, "Type alias enum variants" This PR implements [RFC 2338](https://github.com/rust-lang/rfcs/pull/2338), allowing one to write code like the following. ```rust #![feature(type_alias_enum_variants)] enum Foo { Bar(i32), Baz { i: i32 }, } type Alias = Foo; fn main() { let t = Alias::Bar(0); let t = Alias::Baz { i: 0 }; match t { Alias::Bar(_i) => {} Alias::Baz { i: _i } => {} } } ``` Since `Self` can be considered a type alias in this context, it also enables using `Self::Variant` as both a constructor and pattern. Fixes issues #56199 and #56611. N.B., after discussing the syntax for type arguments on enum variants with @petrochenkov and @eddyb (there are also a few comments on the [tracking issue](https://github.com/rust-lang/rust/issues/49683)), the consensus seems to be treat the syntax as follows, which ought to be backwards-compatible. ```rust Option::<u8>::None; // OK Option::None::<u8>; // OK, but lint in near future (hard error next edition?) Alias::<u8>::None; // OK Alias::None::<u8>; // Error ``` I do not know if this will need an FCP, but let's start one if so.
| * | | | | | | | Fixed stderr files for ui tests.Alexander Regueiro2018-12-293-12/+3
| | | | | | | | |
| * | | | | | | | Changed resolution of enum variants to low priority.Alexander Regueiro2018-12-263-48/+53
| | | | | | | | |
| * | | | | | | | Minor cosmetic changesAlexander Regueiro2018-12-262-9/+10
| | | | | | | | |
| * | | | | | | | Minor clean-upAlexander Regueiro2018-12-262-13/+16
| | | | | | | | |
| * | | | | | | | Fixed ICE when type arguments are specified on `Self` type.Alexander Regueiro2018-12-264-31/+71
| | | | | | | | |
| * | | | | | | | Fixed type inference for tuple struct variants.Alexander Regueiro2018-12-264-21/+17
| | | | | | | | |
| * | | | | | | | Fixed handling of unit variants of aliased enums in type NS.Alexander Regueiro2018-12-265-294/+215
| | | | | | | | |
| * | | | | | | | Added regression test for using generic parameters on modules.Alexander Regueiro2018-12-2635-279/+306
| | | | | | | | |
| * | | | | | | | Fixed several ICEs.Alexander Regueiro2018-12-264-72/+116
| | | | | | | | |
| * | | | | | | | Removed unnecessary special handling of `VariantCtor` defs in ↵Alexander Regueiro2018-12-261-16/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `instantiate_value_path`.
| * | | | | | | | Expanded tests for enum variants with generic args.Alexander Regueiro2018-12-268-139/+419
| | | | | | | | |
| * | | | | | | | Fixed issues raised in review.Alexander Regueiro2018-12-261-31/+18
| | | | | | | | |
| * | | | | | | | Added tests for enums & enum aliases with various combinations of generic args.Alexander Regueiro2018-12-263-0/+139
| | | | | | | | |
| * | | | | | | | Work-around for shadowing of variant names with assoc const names in ↵Alexander Regueiro2018-12-261-8/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `libproc_macro/bridge/rpc.rs`.
| * | | | | | | | Fixed issues raised in first review.Alexander Regueiro2018-12-267-85/+33
| | | | | | | | |