Give preference to projections from where-clauses over those from trait definitions. This makes #28871 work again, though I think there's more to fix in this general area.
r? @arielb1
cc @brson (fixes regression)
Fixes#29184
This adds an error message for the use of the reserved `typeof` keyword, instead of reporting an ICE.
Also adds a `compile-fail` test.
I chose to add a `span_err` instead of removing to parser code, as to preserve the reservation of `typeof`.
It's possible that there is some meaning I'm not grasping from the headers "Traits bounds for generic functions" and "Traits bounds for generic structs", but they seem to me like they could be clearer and more grammatically correct.
Qualified paths allow full path after the `>::`. For example
```rust
<T as Foo>::U::generic_method::<f64>()
```
The example is taken from `test/run-pass/associated-item-long-paths.rs`.
It looks like the target libs aren't actually the same across hosts so instead
of always packaging the target libs from CFG_BUILD take the target libs from the
host if we have them and then only failing that do we take them from CFG_BUILD.
Closes#29228
{BTree,Hash}{Map,Set} will not update their key if it already exists, which
can matter with more complex keys. This behavior is now documented.
Fixes#26888
{BTree,Hash}{Map,Set} will not update their key if it already exists, which
can matter with more complex keys. This behavior is now documented.
Fixes#26888
Qualified paths allow full path after the `>::`. For example
```rust
<T as Foo>::U::generic_method::<f64>()
```
The example is taken from `test/run-pass/associated-item-long-paths.rs`.
trait definitions, and give prefence to the former. This is consistent
with what we do for selection. It also works around a limitation
that was leading to #28871.
When reading this paragraph, the beginning Rust programmer is starting
to write a Hello World program. We have just told her to name the file
`main.rs`, and immediately afterward, a `hello_world.rs` is mentioned.
I changed this to an unrelated filename (incidentally one that appears
in this repository) to make it clear that this is just an example.
Also, wording it as a declarative sentence rather than an imperative one
further separates it from the Hello World instructions in this section.
r? @steveklabnik
(Let me know if I'm sending too many PRs -- I can batch up TRPL edits, say, per chapter, if that works better. Or I can just refrain from editing TRPL as I read through it, if these are not sufficiently useful.)
Adds the pacman git command to the high level Windows installation instructions. As the MSYS2 installation may not include Windows git on the path by default (based on the path settings of Windows users), I figured this could be a helpful inclusion.
The paragraph here seemed confusing, so I reworded it. Also added
another possible reason why `curl | sh` might be objectionable to users.
r? @steveklabnik
The paragraph here seemed confusing, so I reworded it. Also added
another possible reason why `curl | sh` might be objectionable to users.
r? @steveklabnik
It looks like the target libs aren't actually the same across hosts so instead
of always packaging the target libs from CFG_BUILD take the target libs from the
host if we have them and then only failing that do we take them from CFG_BUILD.
Closes#29228