Skip to content

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

the8472 and others added 30 commits October 15, 2021 17:48
The `advance_by(n)` docs state that in the error case `Err(k)` that k is always less than n.
It also states that `advance_by(0)` may return `Err(0)` to indicate an exhausted iterator.
These statements are inconsistent.
Since only one implementation (Skip) actually made use of that I changed it to return Ok(()) in that case too.

While adding some tests I also found a bug in `Take::advance_back_by`.
In some situations we should want on influence into the .cargo/config
when we use vendored source.  One example is rust-lang#90764, when we want to
workaround some references to crates forked and living in git, that are
missing in the vendor/ directory.

This commit will create the .cargo/config file only when the .cargo/
directory needs to be created.
Because it's always `'tcx`. In fact, some of them use a mixture of
passed-in `$tcx` and hard-coded `'tcx`, so no other lifetime would even
work.

This makes the code easier to read.
Be more thorough in using `ItemObligation` and `BindingObligation` when
evaluating obligations so that we can point at trait bounds that
introduced unfulfilled obligations. We no longer incorrectly point at
unrelated trait bounds (`substs-ppaux.verbose.stderr`).

In particular, we now point at trait bounds on method calls.

We no longer point at "obvious" obligation sources (we no longer have a
note pointing at `Trait` saying "required by a bound in `Trait`", like
in `associated-types-no-suitable-supertrait*`).

Address part of rust-lang#89418.
`predicates_of` no longer changes when changing a trait's front matter
because we no longer include the trait's span in the identity trait
obligation.
Group obligations by `impl` block that introduced them.
Also use `Default::default()` in one `TypedArena::default()`, for
consistency with `DroplessArena::default()`.
Make char conversion functions unstably const

The char conversion functions like `char::from_u32` do trivial computations and can easily be converted into const fns. Only smaller tricks are needed to avoid non-const standard library functions like `Result::ok` or `bool::then_some`.

Tracking issue: rust-lang#89259
…=nagisa

Point at source of trait bound obligations in more places

Be more thorough in using `ItemObligation` and `BindingObligation` when
evaluating obligations so that we can point at trait bounds that
introduced unfulfilled obligations. We no longer incorrectly point at
unrelated trait bounds (`substs-ppaux.verbose.stderr`).

In particular, we now point at trait bounds on method calls.

We no longer point at "obvious" obligation sources (we no longer have a
note pointing at `Trait` saying "required by a bound in `Trait`", like
in `associated-types-no-suitable-supertrait*`).

We no longer point at associated items (`ImplObligation`), as they didn't
add any user actionable information, they just added noise.

Address part of rust-lang#89418.
…tolnay

Fix Iterator::advance_by contract inconsistency

The `advance_by(n)` docs state that in the error case `Err(k)` that k is always less than n.
It also states that `advance_by(0)` may return `Err(0)` to indicate an exhausted iterator.
These statements are inconsistent.
Since only one implementation (Skip) actually made use of that I changed it to return Ok(()) in that case too.

While adding some tests I also found a bug in `Take::advance_back_by`.
add const generics test

cc rust-lang#89829 (comment)

r? rust-lang/project-const-generics
…mulacrum

bootstap: create .cargo/config only if not present

In some situations we should want on influence into the .cargo/config
when we use vendored source.  One example is rust-lang#90764, when we want to
workaround some references to crates forked and living in git, that are
missing in the vendor/ directory.

This commit will create the .cargo/config file only when the .cargo/
directory needs to be created.
windows: Return the "Not Found" error when a path is empty

Fixes rust-lang#90940
Arenas cleanup

I was looking closely at the arenas code and here are some small improvement to readability.
fix CTFE/Miri simd_insert/extract on array-style repr(simd) types

The changed test would previously fail since `place_index` would just return the only field of `f32x4`, i.e., the array -- rather than *indexing into* the array which is what we have to do.

The new helper methods will also be needed for rust-lang/miri#1912.

r? `@oli-obk`
@rustbot rustbot added the rollup A PR which is a rollup label Nov 18, 2021
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=9

@bors
Copy link
Collaborator

bors commented Nov 18, 2021

📌 Commit 7131806 has been approved by matthiaskrgr

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Nov 18, 2021
@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-llvm-12 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
.................................................................................................... 1300/1353
.....................................................
failures:

---- iter::adapters::take::test_take_advance_by stdout ----
thread 'iter::adapters::take::test_take_advance_by' panicked at 'attempt to subtract with overflow', /checkout/library/core/src/iter/adapters/take.rs:225:17

failures:
    iter::adapters::take::test_take_advance_by


test result: FAILED. 1350 passed; 1 failed; 2 ignored; 0 measured; 0 filtered out; finished in 1.28s

error: test failed, to rerun pass '-p core --test coretests'


command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "test" "--target" "x86_64-unknown-linux-gnu" "-Zbinary-dep-depinfo" "-j" "16" "--release" "--locked" "--color" "always" "--features" "panic-unwind backtrace compiler-builtins-c" "--manifest-path" "/checkout/library/test/Cargo.toml" "-p" "core" "--" "--quiet"


Build completed unsuccessfully in 0:19:44

@bors
Copy link
Collaborator

bors commented Nov 18, 2021

⌛ Testing commit 7131806 with merge 6c3bf3e3f32bc80f60806ad502cc42ad85d0d936...

@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-llvm-12 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
test slice::select_nth_unstable ... ok

failures:

---- iter::adapters::take::test_take_advance_by stdout ----
thread 'iter::adapters::take::test_take_advance_by' panicked at 'attempt to subtract with overflow', /checkout/library/core/src/iter/adapters/take.rs:225:17

failures:
    iter::adapters::take::test_take_advance_by


test result: FAILED. 1350 passed; 1 failed; 2 ignored; 0 measured; 0 filtered out; finished in 1.28s

error: test failed, to rerun pass '-p core --test coretests'


command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "test" "--target" "x86_64-unknown-linux-gnu" "-Zbinary-dep-depinfo" "-j" "16" "--release" "--locked" "--color" "always" "--features" "panic-unwind backtrace compiler-builtins-c" "--manifest-path" "/checkout/library/test/Cargo.toml" "-p" "core" "--"


Build completed unsuccessfully in 0:20:23

@bors
Copy link
Collaborator

bors commented Nov 18, 2021

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Nov 18, 2021
@matthiaskrgr matthiaskrgr deleted the rollup-9jnt8yq branch November 20, 2021 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.