This is a follow-up to f189d7a693 and 9d11b089ad. While `-z ignore`
is what needs to be passed to the Solaris linker, because gcc is used as
the default linker, both that form and `-Wl,-z -Wl,ignore` (including
extra double quotes) need to be taken into account, which explains the
more complex regular expression.
When trying to perform static dispatch on something which derefs
to a trait object, and the target trait is not in scope, we had
confusing error messages if the target method had a
`Self: Sized` bound. We add a more precise error message in this
case: "consider using trait ...".
Fixes#35976.
extend config.toml doc for debug-assertions
Even after I knew that I had to change config.toml to get any printing from debug! and trace!, going over the entire fail did not make it clear to me that `debug-assertions` is the option controlling that.
Update RLS and deps
This PR further moves towards configuring save-analysis using the rls-data Config struct. We remove completely the concept of api_crate. Updates the RLS so the client is expecting these changes and which pulls in a commit re-enabling all RLS tests (been disabled due to a span error for a while).
Emphasise that these functions look at the disk, not just the path
I thought that `PathBuf::new("foo/bar/").is_dir()` is always true, because the path ends in `/`. However, this is not what `is_dir()` function does. So I've updated the docs to make it clear.
Improve hir::map::Map::get_parent_node doc
The documentation says
```
/// Similar to get_parent, returns the parent node id or id if there is no
/// parent.
/// This function returns the immediate parent in the AST, whereas get_parent
/// returns the enclosing item.
```
One would think that one can walk up the tree by repeatedly calling `get_parent_node` until it returns the argument, and then work on the `NodeId`s that arise. However, that is not true: `get_parent_node` will return id 0 (the crate itself) for items that sit directly in the crate; calling `get` on that `NodeId` will panic.
So, the fact that `get_parent_node` returns the root when passed the root is actually not really useful, because the root itself is already a somewhat degenerate node. This improves the doc so hopefully people writing code that "walks up the tree" don't run into this issue like I did...
incr.comp.: Properly incorporate symbol linkage and visibility into CGU hash.
This PR fixes the way the CGU hash for incr. comp. is computed. The CGU hash represents which `TransItems` are emitted into which codegen unit with which linkage and visibility. Before the new, LLVM-independent symbol internalizer the CGU hash did not accurately contain `TransItem` linkage and visibility because we would not enable symbol internalization in incremental mode anyway. The new internalizer is also run in incremental mode which uncovered the inaccuracy of CGU hashing. Luckily, the fix is rather simple.
r? @eddyb
cc @nikomatsakis
Fix quadratic performance with lots of use statements
This fixes 2 problems that caused quadratic performance when lots of use-statements were present. After this patch, performance is linear (and very fast) even with 1M uses.
Fixes#43572.
Fixes#43573.
r? @eddyb
Derive `Hash` on `AssociatedKind`.
This is a trivial change useful in downstream code poking in rustc's
innards, in particular the semver verification tool I'm currently working on.
r? @eddyb
Fix the Solaris pthread_t raw type in std to match what's in libc
The old type causes failures when building cargo 0.20.0 after rust-lang/libc@8304e06b5.