about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2020-03-09Use `Token::uninterpolate` in couple more places matching on `(Nt)Ident`Vadim Petrochenkov-38/+28
2020-03-09rustc_parse: Remove `Parser::normalized(_prev)_token`Vadim Petrochenkov-40/+7
2020-03-09rustc_ast: Introduce `Token::uninterpolate`Vadim Petrochenkov-6/+22
2020-03-09rustc_ast: Introduce `Token::uninterpolated_span`Vadim Petrochenkov-12/+49
2020-03-09rustc_parse: Use `Token::ident` where possibleVadim Petrochenkov-92/+86
2020-03-08Rollup merge of #69820 - GuillaumeGomez:cleanup-e0392, r=Dylan-DPCMazdak Farrokhzad-2/+3
clean up E0392 explanation r? @Dylan-DPC
2020-03-08Rollup merge of #69807 - GuillaumeGomez:cleanup-e0391, r=Dylan-DPCMazdak Farrokhzad-3/+5
Cleanup E0391 explanation r? @Dylan-DPC
2020-03-08Rollup merge of #69800 - tmiasko:address-g, r=nikicMazdak Farrokhzad-3/+2
Compile address sanitizer test with debuginfo This makes error-pattern to match regardless of current configuration of `rust.debuginfo-level-tests` in `config.toml`.
2020-03-08Rollup merge of #69734 - tmiasko:di-enumerator, r=ecstatic-morseMazdak Farrokhzad-12/+50
Change DIBuilderCreateEnumerator signature to match LLVM 9 * Change DIBuilderCreateEnumerator signature to match LLVM 9 C API. * Use provided is unsigned flag when emitting enumerators.
2020-03-08Rollup merge of #69608 - o01eg:expose-target-libdir-print, r=ehussMazdak Farrokhzad-1/+8
Expose target libdir information via print command With custom libdir it is required to have an access to library placement. See https://github.com/RazrFalcon/cargo-bloat/issues/51
2020-03-08Rollup merge of #69326 - JOE1994:os_str_widestring, r=RalfJungMazdak Farrokhzad-0/+37
mir-interpret: add method to read wide strings from Memory Implemented *step2* from [instructions](https://github.com/rust-lang/miri/issues/707#issuecomment-561564057) laid out in rust-lang/miri#707. Added 2 new methods to struct `rustc_mir::interpret::InterpCx`. * `read_os_str_from_wide_str` (src/librustc_mir/interpret/operand.rs) * `write_os_str_to_wide_str` (src/librustc_mir/interpret/place.rs) - used existing logic implemented in [MIRI/src/eval.rs](https://github.com/rust-lang/miri/blob/94732aaf7bf79fd01a4a48d11155c6586b937514/src/eval.rs#L132-L141) These methods are intended to be used for environment variable emulation in Windows.
2020-03-08Rollup merge of #69120 - spunit262:invalid-sugar-suggest, r=matthewjasperMazdak Farrokhzad-51/+47
Don't give invalid suggestion on desugared span.
2020-03-08Rollup merge of #69812 - Marwes:refactor, r=petrochenkovMazdak Farrokhzad-81/+47
Refactorings to method/probe.rs and CrateId A couple of refactorings done while looking into performance improvements in method resolution.
2020-03-08Rollup merge of #69777 - lukas-code:patch-1, r=jonas-schievinkMazdak Farrokhzad-1/+1
Add missing ` in doc for File::with_options()
2020-03-08Rollup merge of #69771 - GuillaumeGomez:cleanup-e0390, r=Dylan-DPCMazdak Farrokhzad-1/+3
Cleanup E0390 explanation r? @Dylan-DPC
2020-03-08Rollup merge of #69668 - ssomers:btreemap_even_more_comments, r=Mark-SimulacrumMazdak Farrokhzad-14/+19
More documentation and simplification of BTreeMap's internals Salvage the documentation and simplification from #67980, without changing the type locked down by debuginfo. r? @rkruppe
2020-03-08Rollup merge of #69651 - Mark-Simulacrum:black-box-marker, r=eddybMazdak Farrokhzad-1/+11
Try to ensure usize marker does not get merged This follows up on [this conversation](https://github.com/rust-lang/rust/pull/69209#discussion_r379911282). However, I'm not confident this is quite correct, so feedback is appreciated, as always.
2020-03-08Rollup merge of #69646 - RalfJung:layout-visitor, r=eddybMazdak Farrokhzad-356/+472
Miri visitor: detect primitive types based on type, not layout (also, more tests) I also converted the union-based transmutes to use `mem::transmute` for increased readability. r? @eddyb @oli-obk
2020-03-08Rollup merge of #69631 - RalfJung:rust-src, r=Mark-SimulacrumMazdak Farrokhzad-2/+0
remove non-sysroot sources from rust-src component See https://github.com/rust-lang/rust/pull/69592#discussion_r386238725: these were likely added in https://github.com/rust-lang/rust/pull/58269 for the sake of compiler plugins, but those are being entirely phased out, so there is no good reason to ship these sources. OTOH, @eddyb [wrote](https://github.com/rust-lang/rust/pull/58269#issuecomment-463408918) > Yeah, my question is why librustc_plugin specifically? Everything else makes sense. So maybe there is some good reason to keep these? Then we should have a comment explaining that reason. Cc @eddyb @taeguk @Mark-Simulacrum
2020-03-08fix type size mismatch on 32bitRalf Jung-20/+19
2020-03-08Rollup merge of #69810 - ↵Mazdak Farrokhzad-0/+48
thekuom:test/67523-dynamic-semantics-bindings-after-at, r=Centril test(bindings_after_at): add dynamic drop tests for bindings_after_at Fixes https://github.com/rust-lang/rust/issues/67523. Working towards https://github.com/rust-lang/rust/issues/65490.
2020-03-08Rollup merge of #69805 - petrochenkov:importname, r=CentrilMazdak Farrokhzad-325/+283
resolve: Modernize some naming `ImportDirective` -> `Import` `ImportDirectiveSubclass` -> `ImportKind` `ImportKind::SingleImport` -> `ImportKind::Single` `ImportKind::GlobImport` -> `ImportKind::Glob`
2020-03-08Rollup merge of #69776 - ssomers:fix69769, r=Mark-SimulacrumMazdak Farrokhzad-2/+35
Fix & test leak of some BTreeMap nodes on panic during `into_iter` Fixes #69769
2020-03-08Rollup merge of #69641 - ehuss:update-books, r=ehussMazdak Farrokhzad-0/+0
Update books ## nomicon 8 commits in 3e6e1001dc6e095dbd5c88005e80969f60e384e1..9f797e65e6bcc79419975b17aff8e21c9adc039f 2019-12-14 22:08:52 +0000 to 2020-03-04 03:45:13 +0100 - Rustup to latest rustc (rust-lang-nursery/nomicon#203) - (minor) Add backticks around type names (rust-lang-nursery/nomicon#197) - Add book.toml (rust-lang-nursery/nomicon#185) - Rename `Alloc` to `AllocRef` (rust-lang-nursery/nomicon#188) - Lifetimes: explain how to fix destructor example (rust-lang-nursery/nomicon#195) - mention soundness (rust-lang-nursery/nomicon#194) - Fix example in FFI section Calling Rust from C (rust-lang-nursery/nomicon#193) - Removed repeated word (rust-lang-nursery/nomicon#191) ## reference 8 commits in 64239df6d173562b9deb4f012e4c3e6e960c4754..559e09caa9661043744cf7af7bd88432d966f743 2020-02-10 19:05:13 +0100 to 2020-03-02 01:17:14 +0100 - Syntax error fix (rust-lang-nursery/reference#769) - Fix incorrect pseudocode for #[repr(C)] struct alignment (rust-lang-nursery/reference#766) - Replace "Field-Less" with "Fieldless" (rust-lang-nursery/reference#768) - Removed repeated word (rust-lang-nursery/reference#767) - Update for change in const lint name. (rust-lang-nursery/reference#764) - semantic type -> resolved type (rust-lang-nursery/reference#761) - add behavior change of relative paths without `self` in 2018 edition (rust-lang-nursery/reference#757) - assignment operator expressions -> compound assignment expressions (rust-lang-nursery/reference#759) ## rust-by-example 3 commits in 32facd5522ddbbf37baf01e4e4b6562bc55c071a..db57f899ea2a56a544c8d280cbf033438666273d 2020-02-11 09:25:06 -0300 to 2020-02-18 17:46:46 -0300 - Minor typo fix in src/mod/visibility (rust-lang/rust-by-example#1309) - Don't suggest Into implements a reverse conversion (rust-lang/rust-by-example#1307) - Improve grammar in example of 'in let' section (rust-lang/rust-by-example#1308) ## embedded-book 2 commits in b2e1092bf67bd4d7686c4553f186edbb7f5f92db..b81ffb7a6f4c5aaed92786e770e99db116aa4ebd 2020-01-30 08:45:46 +0000 to 2020-02-27 08:06:04 +0000 - Setting output to `high` needs a `true` argument (rust-embedded/book#227) - Add licence notes to index.md (rust-embedded/book#226)
2020-03-08Rollup merge of #69599 - Centril:typeck-tweak-wording, r=davidtwcoMazdak Farrokhzad-10/+18
check_binding_alt_eq_ty: improve precision wrt. `if let` Follow up to https://github.com/rust-lang/rust/pull/69452 -- this tweaks the `check_binding_alt_eq_ty` logic wrt. wording so that `if let` doesn't include "in this arm" (because there can only ever be one arm). r? @estebank
2020-03-08Rollup merge of #69561 - JohnTitor:clean-up-unstable-book, r=Mark-SimulacrumMazdak Farrokhzad-58/+20
Clean up unstable book - #58402's feature was renamed to `tidy_test_never_used_anywhere_else` and it is now used for tidy only - `read_initializer` link is wrong and the doc should be auto-generated so removed - Add dummy doc for `link_cfg` - Stop generating `compiler_builtins_lib` doc in favor of b8ccc0f8a60ac16fdc00f4b2e36e1a5db8b78295 - Make `rustc_attrs` tracking issue "None"
2020-03-08Rollup merge of #69548 - LeSeulArtichaut:assert-errors, r=petrochenkovMazdak Farrokhzad-21/+11
Turn trailing tokens in `assert!()` into hard errors I didn't have time to build the compiler and thus edited the tests manually, I hope it will still pass. Closes #69531 r? @Centril do you want to queue the Crater experiment?
2020-03-08Rollup merge of #69422 - JohnTitor:remove-unwrap, r=XanewokMazdak Farrokhzad-35/+43
Remove use of `unwrap()` from save-analysis Fix #69409, fix #69416
2020-03-08clean up E0392 explanationGuillaume Gomez-2/+3
2020-03-08Cleanup E0391 explanationGuillaume Gomez-3/+5
2020-03-08Auto merge of #69804 - Centril:rollup-u86dc1g, r=Centrilbors-381/+285
Rollup of 8 pull requests Successful merges: - #69667 (Remove the `no_debug` feature) - #69687 (resolve, inconsistent binding mode: tweak wording) - #69708 (On mismatched delimiters, only point at empty blocks that are in the same line) - #69765 (reduce test size for Miri) - #69773 (fix various typos) - #69787 (mir::Local is Copy we can pass it by value in these cases) - #69794 (Add `Layout::dangling()` to return a well-aligned `NonNull<u8>`) - #69797 (Correct version that relaxed orphan rules) Failed merges: r? @ghost
2020-03-07refactor: Move a borrow_mut and unwrap out of a loopMarkus Westerlind-6/+8
2020-03-07refactor: Exhaustive matching in method/probe.rsMarkus Westerlind-75/+39
2020-03-07test(bindings_after_at): add dynamic drop tests for bindings_after_atMatthew Kuo-0/+48
2020-03-07resolve: `directive` -> `import`Vadim Petrochenkov-237/+215
2020-03-07Rollup merge of #69797 - jongiddy:convert-version, r=Mark-SimulacrumMazdak Farrokhzad-1/+1
Correct version that relaxed orphan rules Docs say > Prior to Rust 1.40, if the destination type was not part of the current crate then you couldn't implement From directly Version 1.41 of Rust introduced the change to the orphan rules - https://blog.rust-lang.org/2020/01/30/Rust-1.41.0.html#relaxed-restrictions-when-implementing-traits - so this should say > Prior to Rust 1.41...
2020-03-07Rollup merge of #69794 - TimDiekmann:dangling, r=AmanieuMazdak Farrokhzad-0/+16
Add `Layout::dangling()` to return a well-aligned `NonNull<u8>` Adds a convenient function to `Layout` to create a `NonNull<u8>` out of a layout to be returned on ZST allocations. This is the first item on the roadmap to support ZSTs in `AllocRef`: https://github.com/rust-lang/wg-allocators/issues/38#issuecomment-595861542 r? @Amanieu
2020-03-07Rollup merge of #69787 - spastorino:use-local-directly-its-copy, r=oli-obkMazdak Farrokhzad-12/+12
mir::Local is Copy we can pass it by value in these cases r? @oli-obk
2020-03-07Rollup merge of #69773 - matthiaskrgr:typos, r=petrochenkovMazdak Farrokhzad-158/+158
fix various typos
2020-03-07Rollup merge of #69765 - RalfJung:miri-test, r=LukasKalbertodtMazdak Farrokhzad-2/+2
reduce test size for Miri The larger sizes take quite a while, and there is probably little point in repeating this quite so often.
2020-03-07Rollup merge of #69708 - estebank:tiny, r=petrochenkovMazdak Farrokhzad-9/+8
On mismatched delimiters, only point at empty blocks that are in the same line We point at empty blocks when we have mismatched braces to detect cases where editors auto insert `}` after writing `{`. Gate this to only the case where the entire span is in the same line so we never point at explicitly empty blocks.
2020-03-07Rollup merge of #69687 - Centril:bm-inconsistent-wording, r=estebankMazdak Farrokhzad-74/+74
resolve, inconsistent binding mode: tweak wording Now that we can have e.g. `let Ok(x) | Err(x) = res;`, it's no longer appropriate to refer to "the same *match arm*", so let's tweak the wording. r? @estebank
2020-03-07Rollup merge of #69667 - JohnTitor:no-debug, r=nikomatsakisMazdak Farrokhzad-125/+14
Remove the `no_debug` feature Context: https://github.com/rust-lang/rust/issues/29721#issuecomment-367642779 r? @nikomatsakis
2020-03-07resolve: `ImportDirective` -> `Import`Vadim Petrochenkov-125/+105
`ImportDirectiveSubclass` -> `ImportKind` `ImportKind::SingleImport` -> `ImportKind::Single` `ImportKind::GlobImport` -> `ImportKind::Glob`
2020-03-07Auto merge of #69676 - ecstatic-morse:fix-enum-discr-effect, r=oli-obkbors-20/+28
Pass correct place to `discriminant_switch_effect` PR #69562, which fixed a bug that was causing clippy to ICE, mistakenly passed the place holding the *result* of `Rvalue::Discriminant` instead of the place holding its *operand* to `apply_discriminant_switch_effect` as the enum place. As a result, no effect was applied at all, and we lost the perf benefits from marking inactive enum variants as uninitialized. **edit:** The regression test has been split into #69744. r? @oli-obk
2020-03-07Compile address sanitizer test with debuginfoTomasz Miąsko-3/+2
This makes error-pattern to match regardless of current configuration of `rust.debuginfo-level-tests` in `config.toml`.
2020-03-07Correct version that relaxed orphan rulesJonathan Giddy-1/+1
2020-03-07Rollup merge of #69782 - matthiaskrgr:redundant_field_name_rep, r=cramertjMazdak Farrokhzad-100/+88
Don't redundantly repeat field names (clippy::redundant_field_names)
2020-03-07Rollup merge of #69754 - Dylnuge:dylnuge/dep-version, r=Mark-SimulacrumMazdak Farrokhzad-1/+1
Update deprecation version to 1.42 for Error::description Error::description is deprecated as of version 1.42, as the commit was not in the release for 1.41. Fixes #69751
2020-03-07Rollup merge of #69727 - JohnTitor:sugg-unwrap, r=estebankMazdak Farrokhzad-3/+43
Avoid using `unwrap()` in suggestions Fixes #69725 r? @estebank