-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Comparing changes
Open a pull request
base repository: rust-lang/rust
base: 663d2f5cd3163f17eddb74ee1e028d542255f21a
head repository: rust-lang/rust
compare: 5180f3da5fd72627a8d38558ad1297df38793acd
Commits on Aug 1, 2020
-
Document that slice means pointer to a sequence
Also document that slices are twice as large as pointers to Sized types
Configuration menu - View commit details
-
Copy full SHA for e6c83dd - Browse repository at this point
Copy the full SHA e6c83ddView commit details -
Configuration menu - View commit details
-
Copy full SHA for a9af93b - Browse repository at this point
Copy the full SHA a9af93bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 41d3e1c - Browse repository at this point
Copy the full SHA 41d3e1cView commit details
Commits on Aug 18, 2020
-
Configuration menu - View commit details
-
Copy full SHA for c4fb3f2 - Browse repository at this point
Copy the full SHA c4fb3f2View commit details
Commits on Aug 22, 2020
-
Configuration menu - View commit details
-
Copy full SHA for a2a387c - Browse repository at this point
Copy the full SHA a2a387cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1241f19 - Browse repository at this point
Copy the full SHA 1241f19View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7ad4369 - Browse repository at this point
Copy the full SHA 7ad4369View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0e4f335 - Browse repository at this point
Copy the full SHA 0e4f335View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4f92f0d - Browse repository at this point
Copy the full SHA 4f92f0dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9a12d9a - Browse repository at this point
Copy the full SHA 9a12d9aView commit details -
Configuration menu - View commit details
-
Copy full SHA for df57e28 - Browse repository at this point
Copy the full SHA df57e28View commit details -
Configuration menu - View commit details
-
Copy full SHA for 15643d5 - Browse repository at this point
Copy the full SHA 15643d5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6a5e657 - Browse repository at this point
Copy the full SHA 6a5e657View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3cd450e - Browse repository at this point
Copy the full SHA 3cd450eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 23e08e2 - Browse repository at this point
Copy the full SHA 23e08e2View commit details -
Configuration menu - View commit details
-
Copy full SHA for c8a372e - Browse repository at this point
Copy the full SHA c8a372eView commit details -
Configuration menu - View commit details
-
Copy full SHA for b65daa7 - Browse repository at this point
Copy the full SHA b65daa7View commit details -
Don't make clang use gcc's include-fixed
This was breaking `#include_next <limits.h>`, such that we weren't getting definitions of `PATH_MAX` and `_POSIX_ARG_MAX`.
Configuration menu - View commit details
-
Copy full SHA for df4bafc - Browse repository at this point
Copy the full SHA df4bafcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 636ca7a - Browse repository at this point
Copy the full SHA 636ca7aView commit details -
Configuration menu - View commit details
-
Copy full SHA for a210a29 - Browse repository at this point
Copy the full SHA a210a29View commit details -
Apply suggestions from code review
Flatten the INC definition to one line. Co-authored-by: lzutao <taolzu@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 5c87749 - Browse repository at this point
Copy the full SHA 5c87749View commit details -
Match scalar-pair-bool more flexibly for LLVM 11
LLVM 11 started using `phi` and `select` for `fn pair_i32_bool`, which is still valid, but harder to match than the simple instructions we were getting before. We'll just check that the unpacked args are directly referenced in any way, and call it good.
Configuration menu - View commit details
-
Copy full SHA for fb05be0 - Browse repository at this point
Copy the full SHA fb05be0View commit details -
Configuration menu - View commit details
-
Copy full SHA for b450c0c - Browse repository at this point
Copy the full SHA b450c0cView commit details -
Configuration menu - View commit details
-
Copy full SHA for cd24aee - Browse repository at this point
Copy the full SHA cd24aeeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0fcad9c - Browse repository at this point
Copy the full SHA 0fcad9cView commit details -
Use smaller def span for functions
Currently, the def span of a funtion encompasses the entire function signature and body. However, this is usually unnecessarily verbose - when we are pointing at an entire function in a diagnostic, we almost always want to point at the signature. The actual contents of the body tends to be irrelevant to the diagnostic we are emitting, and just takes up additional screen space. This commit changes the `def_span` of all function items (freestanding functions, `impl`-block methods, and `trait`-block methods) to be the span of the signature. For example, the function ```rust pub fn foo<T>(val: T) -> T { val } ``` now has a `def_span` corresponding to `pub fn foo<T>(val: T) -> T` (everything before the opening curly brace). Trait methods without a body have a `def_span` which includes the trailing semicolon. For example: ```rust trait Foo { fn bar(); }``` the function definition `Foo::bar` has a `def_span` of `fn bar();` This makes our diagnostic output much shorter, and emphasizes information that is relevant to whatever diagnostic we are reporting. We continue to use the full span (including the body) in a few of places: * MIR building uses the full span when building source scopes. * 'Outlives suggestions' use the full span to sort the diagnostics being emitted. * The `#[rustc_on_unimplemented(enclosing_scope="in this scope")]` attribute points the entire scope body. * The 'unconditional recursion' lint uses the full span to show additional context for the recursive call. All of these cases work only with local items, so we don't need to add anything extra to crate metadata.
Configuration menu - View commit details
-
Copy full SHA for e3cd43e - Browse repository at this point
Copy the full SHA e3cd43eView commit details
Commits on Aug 23, 2020
-
Auto merge of #73084 - Aaron1011:feature/new-recursive-expand, r=petr…
…ochenkov Re-land PR #72388: Recursively expand `TokenKind::Interpolated` in `probably_equal_for_proc_macro` PR #72388 allowed us to preserve the original `TokenStream` in more cases during proc-macro expansion, but had to be reverted due to a large number of regressions (See #72545 and #72622). These regressions fell into two categories 1. Missing handling for `Group`s with `Delimiter::None`, which are inserted during `macro_rules!` expansion (but are lost during stringification and re-parsing). A large number of these regressions were due to `syn` and `proc-macro-hack`, but several crates needed changes to their own proc-macro code. 2. Legitimate hygiene issues that were previously being masked by stringification. Some of these were relatively benign (e.g. [a compiliation error](paritytech/parity-scale-codec#210) caused by misusing `quote_spanned!`). However, two crates had intentionally written unhygenic `macro_rules!` macros, which were able to access identifiers that were not passed as arguments (see #72622 (comment)). All but one of the Crater regressions have now been fixed upstream (see https://hackmd.io/ItrXWRaSSquVwoJATPx3PQ?both). The remaining crate (which has a PR pending at sammhicks/face-generator#1) is not on `crates.io`, and is a Yew application that seems unlikely to have any reverse dependencies. As @petrochenkov mentioned in #72545 (comment), not re-landing PR #72388 allows more crates to write unhygenic `macro_rules!` macros, which will eventually stop compiling. Since there is only one Crater regression remaining, since additional crates could write unhygenic `macro_rules!` macros in the time it takes that PR to be merged.
Configuration menu - View commit details
-
Copy full SHA for e482c86 - Browse repository at this point
Copy the full SHA e482c86View commit details -
Auto merge of #73526 - cuviper:rust-llvm11, r=nikic
Upgrade to LLVM 11 (rc2) This builds on #73525 to try actually moving rust-lang/llvm-project to LLVM 11.
Configuration menu - View commit details
-
Copy full SHA for 7ce71c3 - Browse repository at this point
Copy the full SHA 7ce71c3View commit details -
Auto merge of #75813 - petrochenkov:feature/incr-def-path-table, r=Aa…
…ron1011 Lazy decoding of DefPathTable from crate metadata (non-incremental case) The is the half of #74967 that doesn't touch incremental-related structures. We are still decoding def path hashes eagerly if we are in incremental mode. The incremental part of #74967 feels hacky, but I'm not qualified enough to suggest improvements. I'll reassign it so someone else once this PR lands. @Aaron1011, I wasn't asking you to do this split because I wasn't sure that it's feasible (or simple to do). r? @Aaron1011
Configuration menu - View commit details
-
Copy full SHA for d5abc8d - Browse repository at this point
Copy the full SHA d5abc8dView commit details -
Auto merge of #75465 - Aaron1011:feature/short-fn-def-span, r=estebank
Use smaller def span for functions Currently, the def span of a function encompasses the entire function signature and body. However, this is usually unnecessarily verbose - when we are pointing at an entire function in a diagnostic, we almost always want to point at the signature. The actual contents of the body tends to be irrelevant to the diagnostic we are emitting, and just takes up additional screen space. This commit changes the `def_span` of all function items (freestanding functions, `impl`-block methods, and `trait`-block methods) to be the span of the signature. For example, the function ```rust pub fn foo<T>(val: T) -> T { val } ``` now has a `def_span` corresponding to `pub fn foo<T>(val: T) -> T` (everything before the opening curly brace). Trait methods without a body have a `def_span` which includes the trailing semicolon. For example: ```rust trait Foo { fn bar(); } ``` the function definition `Foo::bar` has a `def_span` of `fn bar();` This makes our diagnostic output much shorter, and emphasizes information that is relevant to whatever diagnostic we are reporting. We continue to use the full span (including the body) in a few of places: * MIR building uses the full span when building source scopes. * 'Outlives suggestions' use the full span to sort the diagnostics being emitted. * The `#[rustc_on_unimplemented(enclosing_scope="in this scope")]` attribute points the entire scope body. All of these cases work only with local items, so we don't need to add anything extra to crate metadata.
Configuration menu - View commit details
-
Copy full SHA for d5ba3ef - Browse repository at this point
Copy the full SHA d5ba3efView commit details -
Auto merge of #75789 - matthiaskrgr:clippy_compiletest, r=Dylan-DPC
compiletest: fix a couple clippy lint findings
Configuration menu - View commit details
-
Copy full SHA for 2342cc3 - Browse repository at this point
Copy the full SHA 2342cc3View commit details -
Configuration menu - View commit details
-
Copy full SHA for b88434e - Browse repository at this point
Copy the full SHA b88434eView commit details -
Revert changed paragraph about slice definition.
This reverts part of commit e6c83dd. As requested by @steveklabnik .
Configuration menu - View commit details
-
Copy full SHA for cf76256 - Browse repository at this point
Copy the full SHA cf76256View commit details -
Configuration menu - View commit details
-
Copy full SHA for eb27828 - Browse repository at this point
Copy the full SHA eb27828View commit details -
Co-authored-by: Josh Stone <cuviper@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 4129e07 - Browse repository at this point
Copy the full SHA 4129e07View commit details -
Auto merge of #74238 - RalfJung:offset_from, r=oli-obk
stabilize ptr_offset_from This stabilizes ptr::offset_from, and closes #41079. It also removes the deprecated `wrapping_offset_from`. This function was deprecated 19 days ago and was never stable; given an FCP of 10 days and some waiting time until FCP starts, that leaves at least a month between deprecation and removal which I think is fine for a nightly-only API. Regarding the open questions in #41079: * Should offset_from abort instead of panic on ZSTs? -- As far as I know, there is no precedent for such aborts. We could, however, declare this UB. Given that the size is always known statically and the check thus rather cheap, UB seems excessive. * Should there be more methods like this with different restrictions (to allow nuw/nsw, perhaps) or that return usize (like how isize-taking offset is more conveniently done with usize-taking add these days)? -- No reason to block stabilization on that, we can always add such methods later. Also nominating the lang team because this exposes an intrinsic. The stabilized method is best described [by its doc-comment](https://github.com/RalfJung/rust/blob/56d4b2d69abb93e4f0ca79471deca7aaaaeca214/src/libcore/ptr/const_ptr.rs#L227). The documentation forgot to mention the requirement that both pointers must "have the same provenance", aka "be derived from pointers to the same allocation", which I am adding in this PR. This is a precondition that [Miri already implements](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=a3b9d0a07a01321f5202cd99e9613480) and that, should LLVM ever obtain a `psub` operation to subtract pointers, will likely be required for that operation (following the semantics in [this paper](https://people.mpi-sws.org/~jung/twinsem/twinsem.pdf)).
Configuration menu - View commit details
-
Copy full SHA for 9d606d9 - Browse repository at this point
Copy the full SHA 9d606d9View commit details -
Auto merge of #75028 - MrModder:master, r=steveklabnik
Document that slice refers to any pointer type to a sequence I was recently confused about the way slices are represented in memory. The necessary information was not available in the std-docs directly, but was a mix of different material from the reference and book. This PR should clear up the definition of slices a bit more in the documentation. Especially the fact that the term slice refers to the pointer/reference type, e.g. `&[T]`, and not `[T]`. It also documents that slice pointers are twice the size of pointers to `Sized` types, as this concept may be unfamiliar to users coming from other languages that do not have the concept of "fat pointers" (especially C/C++). I've documented why this was important to me and my findings in [this blog post](https://codecrash.me/understanding-rust-slices). r? @lcnr
Configuration menu - View commit details
-
Copy full SHA for d02a209 - Browse repository at this point
Copy the full SHA d02a209View commit details -
Co-authored-by: Ralf Jung <post@ralfj.de>
Configuration menu - View commit details
-
Copy full SHA for 130766c - Browse repository at this point
Copy the full SHA 130766cView commit details -
Auto merge of #72449 - ecstatic-morse:const-float-bitcast, r=RalfJung
Configuration menu - View commit details
-
Copy full SHA for 0ec9459 - Browse repository at this point
Copy the full SHA 0ec9459View commit details -
Auto merge of #75656 - tirr-c:match-suggest-semi, r=estebank
Configuration menu - View commit details
-
Copy full SHA for 5180f3d - Browse repository at this point
Copy the full SHA 5180f3dView commit details
There are no files selected for viewing