As discovered in #20376, the MSYS shell will silently rewrite arguemnts that
look like unix paths into their windows path counterparts for compatibility, but
the recently added `:kind` syntax added to the `-L` flag does not allow for this
form of rewriting. This means that the syntax can be difficult to use at an MSYS
prompt, as well as causing tests to fail when run manuall right now.
This commit takes the other option presented in the original issue to prefix the
path with `kind=` instead of suffixing it with `:kind`. For consistence, the
`-l` flag is also now migrating to `kind=name`.
This is a breaking change due to the *removal* of behavior with `-L`. All code
using `:kind` should now pass `kind=` for `-L` arguments. This is not currently,
but will become, a breaking change for `-l` flags. The old `name:kind` syntax is
still accepted, but all code should update to `kind=name`.
[breaking-change]
Closes#20376
This commit performs a second pass over the `std::thread_local` module. Most of
the functionality remains explicitly unstable, but the specific actions taken
were:
* `thread_local` is now stable
* `thread_local!` is now stable
* `thread_local::Key` is now stable
* `thread_local::Key::with` is now stable
* `thread_local::Key::destroyed` is deprecated in favor of a more general
`state` function
* `thread_local::Key::state` was added to query the three states that a key can
be in: uninitialized, valid, or destroyed. This function, and the
corresponding `State` enum, are both marked unstable as we may wish to expand
it later on.
* `thread_local::scoped` is entirely unstable. There hasn't been a whole lot of
usage of this module in the standard distribution, so it remains unstable at
this time.
Note that while the structure `Key` is marked stable, it is currently forced to
expose all of its implementation details due to the use of
construction-via-macro. The use of construction-via-macro is currently required
in order to place the `#[thread_local]` attribute on static in a
platform-specific manner. These stability attributes were assigned assuming that
it will be acceptable to tweak the implementation of `Key` in the future.
is still probably wrong since it fails to incorporate the ambiguity
resolution measures that `select` uses. Also, made more complicated by
the fact that trait object types do not impl their own traits yet.
Patch for #20340. `rustdoc --version` panics because it uses `rustc_driver::version`, which in turn checks the `verbose` flag, which was not defined for rustdoc. In this patch I have added a verbose flag to rustdoc, because I think it should be useful for other things besides --version.
Another possible fix would be to check if a verbose option was defined in `rustc_driver` or add an extra `version` function for rustdoc.