about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2021-01-08Move DepNodeExt outside of the macro.Camille GILLOT-95/+91
2021-01-07Auto merge of #79863 - JohnTitor:compiler-builtins, r=bjorn3bors-8/+8
Update `compiler_builtins` to 0.1.39 This version contains the fixes of https://github.com/rust-lang/compiler-builtins/issues/390 and https://github.com/rust-lang/compiler-builtins/issues/391. Also, rename features following https://github.com/rust-lang/compiler-builtins/pull/386.
2021-01-07Auto merge of #80648 - Aaron1011:expn-data-private, r=petrochenkovbors-27/+63
Make `ExpnData` fields `krate` and `orig_id` private These fields are only used by hygiene serialized, and should not be accessed by anything outside of `rustc_span`.
2021-01-07Update `compiler_builtins` to 0.1.39Yuki Okushi-8/+8
2021-01-07Auto merge of #80200 - mahkoh:dst-offset, r=nagisabors-10/+44
Optimize DST field access For struct X<T: ?Sized>(T) struct Y<T: ?Sized>(u8, T) the offset of the unsized field is 0 mem::align_of_val(&self.1) respectively. This patch changes the expression used to compute these offsets so that the optimizer can perform this optimization. Consider ```rust fn f(x: &X<dyn Any>) -> &dyn Any { &x.0 } ``` Before: ```asm test: movq %rsi, %rdx movq 16(%rsi), %rax leaq -1(%rax), %rcx negq %rax andq %rcx, %rax addq %rdi, %rax retq ``` After: ```asm test: movq %rsi, %rdx movq %rdi, %rax retq ```
2021-01-07Auto merge of #80425 - camelid:resolve-moduledata-docs, r=petrochenkovbors-28/+44
Document `ModuleData` and improve names - Document `ModuleData` - Rename `ModuleData.normal_ancestor_id` to `nearest_parent_mod` - Rename `Resolver::nearest_mod_parent` to `nearest_parent_mod` cc https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/mentoring/near/221029702 r? `@petrochenkov`
2021-01-06Auto merge of #80754 - sunfishcode:path-cleanup/rustc-fs-util, r=davidtwcobors-2/+4
Optimize away a `fs::metadata` call. This also eliminates a use of a `Path` convenience function, in support of #80741, refactoring `std::path` to focus on pure data structures and algorithms.
2021-01-06Rename to `nearest_parent_mod`Camelid-27/+35
* Rename `ModuleData.normal_ancestor_id` to `nearest_parent_mod` `normal_ancestor_id` is a very confusing name if you don't already understand what it means. Adding docs helps, but using a clearer and more obvious name is also important. * Rename `Resolver::nearest_mod_parent` to `nearest_parent_mod` * Add more docs
2021-01-06Document `ModuleData`Camelid-6/+14
* Convert comments on fields to doc comments so they're visible in API docs * Add new documentation * Get rid of "normal module" terminology
2021-01-06Auto merge of #80758 - RalfJung:miri, r=RalfJungbors-9/+7
update Miri update Miri to include fix for https://github.com/rust-lang/miri/issues/1643 Cc `@rust-lang/miri` r? `@ghost`
2021-01-06update MiriRalf Jung-9/+7
2021-01-06Optimize away a `fs::metadata` call.Dan Gohman-2/+4
This also eliminates a use of a `Path` convenience function, in support of #80741, refactoring `std::path` to focus on pure data structures and algorithms.
2021-01-06Auto merge of #80714 - jakevossen5:master, r=lcnrbors-55/+55
fixed const_generics error help Closes https://github.com/rust-lang/rust/issues/80702
2021-01-06Auto merge of #80724 - GuillaumeGomez:remove-useless-doc_alias-feature, r=jyn514bors-23/+17
Remove useless doc_alias feature gate As `@jyn514` rightfully noted in https://github.com/rust-lang/rust/pull/80686 , this feature is no more. Therefore, cleanup time! r? `@jyn514`
2021-01-06Auto merge of #80415 - cjgillot:issue-77828, r=petrochenkovbors-8/+31
Compute parent module when collecting hir::MacroDef. Fixes #77828. r? `@jyn514`
2021-01-05Do not swallow parent for MacroDef.Camille GILLOT-1/+1
2021-01-05Add rustdoc test.Camille GILLOT-0/+14
2021-01-05Compute parent module when collecting hir::MacroDef.Camille GILLOT-7/+16
2021-01-05Auto merge of #80711 - camelid:intrinsic-of-val-safety, r=oli-obkbors-7/+11
Make `size_of_val` and `min_align_of_val` intrinsics unsafe Fixes #80668. r? `@oli-obk`
2021-01-05Remove useless doc_alias featureGuillaume Gomez-23/+17
2021-01-05Auto merge of #80717 - mbartlett21:patch-2, r=dtolnaybors-12/+12
Add more code spans to docs in intrinsics.rs I have added some more code spans in core/src/intrinsics.rs, changing some `=` to `==`, etc. I also changed the wording in some sections.
2021-01-05Auto merge of #80699 - usbalbin:const_copy_tracking_issue, r=oli-obkbors-3/+2
const_intrinsic_copy - Add Reference to tracking issue Add reference to tracking issue #80697 for feature gate added in previous PR #79684
2021-01-05Auto merge of #80686 - GuillaumeGomez:error-doc-alias-same-name, r=jyn514bors-1/+36
Error when #[doc(alias)] has same name as the item Something I came across when reviewing some doc alias PRs. r? `@jyn514`
2021-01-05Add code spans to docs in intrinsics.rsmbartlett21-12/+12
2021-01-05fixed feature gate stderrJake Vossen-1/+1
2021-01-05fixed const_generics error helpJake Vossen-54/+54
2021-01-04Make `size_of_val` and `min_align_of_val` intrinsics unsafeCamelid-7/+11
2021-01-05Auto merge of #80708 - JohnTitor:rollup-6esk027, r=JohnTitorbors-88/+173
Rollup of 12 pull requests Successful merges: - #80442 (Mention Arc::make_mut and Rc::make_mut in the documentation of Cow) - #80533 (bootstrap: clippy fixes) - #80538 (Add check for `[T;N]`/`usize` mismatch in astconv) - #80612 (Remove reverted change from relnotes) - #80627 (Builder: Warn if test file does not exist) - #80637 (Use Option::filter instead of open-coding it) - #80643 (Move variable into the only branch where it is relevant) - #80656 (Fixed documentation error for `std::hint::spin_loop`) - #80666 (Fix missing link for "fully qualified syntax") - #80672 (./x.py clippy: allow the most noisy lints) - #80677 (doc -- list edit for consistency) - #80696 (make sure that promoteds which fail to evaluate in dead const code behave correctly) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2021-01-05Rollup merge of #80696 - RalfJung:failing-promoteds, r=oli-obkYuki Okushi-2/+13
make sure that promoteds which fail to evaluate in dead const code behave correctly https://github.com/rust-lang/rust/pull/80243 showed that we'll have to live with these kinds of failing promoteds for a while, so let's make sure we have a test that covers them.
2021-01-05Rollup merge of #80677 - kw-fn:patch-2, r=jyn514Yuki Okushi-1/+1
doc -- list edit for consistency
2021-01-05Rollup merge of #80672 - matthiaskrgr:xpy_clippy_less_noise, r=Mark-SimulacrumYuki Okushi-0/+11
./x.py clippy: allow the most noisy lints This silences the following clippy lints in ./x.py clippy: many_single_char_names (there are a lot of warnings caused by stdarch) collapsible_if (can reduce readability) type_complexity missing_safety_doc (there are almost 3K warnings issued) too_many_arguments needless_lifetimes (people want 'tcx lifetimes etc) wrong_self_convention (warns about from_..(), to_..(), into_..().. fns that do or do not take self by reference. Just for clarification; this only changes the output of `x.py clippy` inside the rustc repo and does not change anything about clippy or how `cargo clippy` is run on peoples crates.
2021-01-05Rollup merge of #80666 - jjlin:master, r=Dylan-DPCYuki Okushi-0/+1
Fix missing link for "fully qualified syntax" This issue can currently be seen at https://doc.rust-lang.org/stable/std/rc/index.html#toggle-all-docs:~:text=%5B-,fully%20qualified%20syntax It originates from #76138, where the link was added to `library/alloc/src/sync.rs`, but not `library/alloc/src/rc.rs`.
2021-01-05Rollup merge of #80656 - booleancoercion:master, r=sfacklerYuki Okushi-1/+1
Fixed documentation error for `std::hint::spin_loop` Fixes #80644.
2021-01-05Rollup merge of #80643 - LingMan:unwrap, r=oli-obkYuki Okushi-8/+7
Move variable into the only branch where it is relevant At the `if` branch `filter` (the `let` binding) is `None` iff `filter` (the parameter) was `None`. We can branch on the parameter, move the binding into the `if`, and the complexity of handling `Option<Option<_>` largely dissolves. `@rustbot` modify labels +C-cleanup +T-compiler Note: I have no idea how hot this code is. If this method frequently gets called with a `None` filter, there might be a small perf improvement.
2021-01-05Rollup merge of #80637 - LingMan:filter, r=oli-obkYuki Okushi-19/+9
Use Option::filter instead of open-coding it `@rustbot` modify labels +C-cleanup +T-compiler
2021-01-05Rollup merge of #80627 - bugadani:warn, r=Mark-SimulacrumYuki Okushi-1/+13
Builder: Warn if test file does not exist Running `./x.py test` with a file that does not exists (but where the path belongs to a test suite) silently ignores the missing file and runs the whole test suite. This PR prints a warning to reduce the potential surprise factor. Closes #80621
2021-01-05Rollup merge of #80612 - rust-lang:XAMPPRocky-patch-1, r=Mark-SimulacrumYuki Okushi-2/+0
Remove reverted change from relnotes r? `@Mark-Simulacrum`
2021-01-05Rollup merge of #80538 - JulianKnodt:err_usize, r=lcnrYuki Okushi-41/+95
Add check for `[T;N]`/`usize` mismatch in astconv Helps clarify the issue in #80506 by adding a specific check for mismatches between [T;N] and usize. r? `@lcnr`
2021-01-05Rollup merge of #80533 - matthiaskrgr:bootstrap_clppy, r=Mark-SimulacrumYuki Okushi-13/+17
bootstrap: clippy fixes addresses: clippy::or_fun_call clippy::single_char_add_str clippy::comparison_to_empty clippy::or_fun_call
2021-01-05Rollup merge of #80442 - steffahn:mention_arc_in_cow, r=Mark-SimulacrumYuki Okushi-0/+5
Mention Arc::make_mut and Rc::make_mut in the documentation of Cow Following this discussion: https://users.rust-lang.org/t/should-the-cow-documentation-mention-arc/53341 _Rendered (the last paragraph is new):_ ![Screenshot_20201228_171551](https://user-images.githubusercontent.com/3986214/103228135-5d72e200-4930-11eb-89e1-38b5c86b08c7.png) `@rustbot` modify labels: T-doc, T-libs
2021-01-05Auto merge of #80426 - jyn514:bootstrap-caching, r=Mark-Simulacrumbors-10/+11
Don't use `self.date` unconditionally for `program_out_of_date()` This avoids unnecessary cache invalidations for programs not affected by the stage0 version (which is everything except the stage0 compiler itself). The redundant invalidations weren't noticed until now because they only showed up on stage0 bumps, at which point people are used to rebuilding everything anyway. I noticed it in https://github.com/rust-lang/rust/pull/79540 because I wasn't adding `self.date` to the stamp file (because I didn't realize it was necessary). Rather than adding self.date I thought it was better to remove it from the cache key.
2021-01-04Auto merge of #80624 - RalfJung:place-ref, r=oli-obkbors-111/+61
use PlaceRef more consistently instead of loosely coupled local+projection Instead of working directly with the `projections` array, use `iter_projections` and `last_projection`. This avoids having to construct new `PlaceRef` from the pieces everywhere. I only did this for a few files, to see how people think about this. If y'all are happy with this, I'll open an E-mentor issue to complete this. I grepped for `Place::ty_from` to find the places that need adjusting -- this could miss some, but I am not sure what else to grep for.
2021-01-04make sure that promoteds which fail to evaluate in dead const code behave ↵Ralf Jung-2/+13
correctly
2021-01-04Added reference to tracking issue and removed unneeded lineAlbin Hedman-3/+2
2021-01-04Auto merge of #80688 - ehuss:update-mdbook, r=pietroalbinibors-3/+3
[security] Update mdbook Changelog from 0.4.3 to 0.4.5: https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-045
2021-01-04Add tests for new doc alias checkGuillaume Gomez-0/+24
2021-01-04Update mdbookEric Huss-3/+3
2021-01-04Builder: Warn if test file does not existDániel Buga-1/+13
2021-01-04Add an error in case the doc alias is the same as the item it's aliasingGuillaume Gomez-1/+12
2021-01-04Auto merge of #80651 - GroteGnoom:issue-78123-fix, r=Nadrierilbors-0/+34
Add note to non-exhaustive match on reference to empty Rust prints "type `&A` is non-empty" even is A is empty. This is the intended behavior, but can be confusing. This commit adds a note to non-exhaustive pattern errors if they are a reference to something uninhabited. I did not add tests to check that the note is not shown for non-references or inhabited references, because this is already done in other tests. Maybe the added test is superfluous, because `always-inhabited-union-ref` already checks for this case. This does not handle &&Void or &&&void etc. I could add those as special cases as well and ignore people who need quadruple references. Fixes #78123