-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rollup of 3 pull requests #118003
Rollup of 3 pull requests #118003
Conversation
and add an and
In cases like Kani, we will invoke the rustc_internal run command directly for now. It would be handly to be able to have a callback that can return a value. We also need extra methods to convert stable constructs into internal ones, so we can break down the transition into finer grain commits.
We were not iterating over all local variables due to a typo.
Add more APIs to retrieve information about types, and add more instance resolution options. Make `Instance::body()` return an Option<Body>, since not every instance might have an available body. For example, foreign instances, virtual instances, dependencies.
We were previously skipping it for non-generic functions, but this was leaving some constants unevaluated.
Fixed the `has_body()` function operator. Before that, this function was returning false for all shims. Change resolve_drop_in_place() to also return an instance for empty shims, since they may still be required for vtable construction.
When writing a pattern to collect multiple entries of a slice in a single binding, it is easy to misremember or typo the appropriate syntax to do so, instead writing the experimental `X..` pattern syntax. When we encounter a resolve error because `X` isn't available, we suggest `X @ ..` as an alternative. ``` error[E0425]: cannot find value `rest` in this scope --> $DIR/range-pattern-meant-to-be-slice-rest-pattern.rs:3:13 | LL | [1, rest..] => println!("{rest:?}"), | ^^^^ not found in this scope | help: if you meant to collect the rest of the slice in `rest`, use the at operator | LL | [1, rest @ ..] => println!("{rest:?}"), | + ``` Fix rust-lang#88404.
…imulacrum document ABI compatibility I don't think we have any central place where we document our ABI compatibility rules, so let's create one. The `fn()` pointer type seems like a good place since ABI questions can only become relevant when invoking a function through a function pointer. This will likely need T-lang FCP.
…er-errors Misc changes to StableMIR required to Kani use case. First, I wanted to say that I can split this review into multiple if it makes reviewing easier. I bundled them up, since I've been testing them together (See rust-lang/project-stable-mir#51 for the set of more thorough checks). So far, this review includes 3 commits: 1. Add more APIs and fix `Instance::body` - Add more APIs to retrieve information about types. - Add a few more instance resolution options. For the drop shim, we return None if the drop body is empty. Not sure it will be enough. - Make `Instance::body()` return an Option<Body>, since not every instance might have an available body. For example, foreign instances, virtual instances, dependencies. 2. Fix a bug on MIRVisitor - We were not iterating over all local variables due to a typo. 3. Add more SMIR internal impl and callback return value - In cases like Kani, we will invoke the rustc_internal run command directly for now. It would be handly to be able to have a callback that can return a value. - We also need extra methods to convert stable constructs into internal ones, so we can break down the transition into finer grain commits. - For the internal implementation of Region, we're always returning `ReErased` for now.
On resolve error of `[rest..]`, suggest `[rest @ ..]` When writing a pattern to collect multiple entries of a slice in a single binding, it is easy to misremember or typo the appropriate syntax to do so, instead writing the experimental `X..` pattern syntax. When we encounter a resolve error because `X` isn't available, we suggest `X @ ..` as an alternative. ``` error[E0425]: cannot find value `rest` in this scope --> $DIR/range-pattern-meant-to-be-slice-rest-pattern.rs:3:13 | LL | [1, rest..] => println!("{rest:?}"), | ^^^^ not found in this scope | help: if you meant to collect the rest of the slice in `rest`, use the at operator | LL | [1, rest @ ..] => println!("{rest:?}"), | + ``` Fix rust-lang#88404.
@bors r+ rollup=never p=3 |
☀️ Test successful - checks-actions |
📌 Perf builds for each rolled up PR:
previous master: 00bfd6b273 In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
Finished benchmarking commit (ee5ef3a): comparison URL. Overall result: ✅ improvements - no action needed@rustbot label: -perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 675.609s -> 675.386s (-0.03%) |
( |
Successful merges:
[rest..]
, suggest[rest @ ..]
#117998 (On resolve error of[rest..]
, suggest[rest @ ..]
)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup