Normalize types before using them in debuginfo.
Small oversight, fixes#33096 - odd thing is that the old code doesn't look like it should've ever worked, although it wasn't using all of the type parameters, so maybe that's what changed.
mk: Fix use of deprecated configure var
The `--android-cross-path` has been deprecated for some time now, we should use
`CFG_ARM_LINUX_ANDROIDEABI_NDK` instead.
Ideally this would use the right triple, but we're only testing ARM for now.
The `--android-cross-path` has been deprecated for some time now, we should use
`CFG_ARM_LINUX_ANDROIDEABI_NDK` instead.
Ideally this would use the right triple, but we're only testing ARM for now.
In fact, we make JSOn the default and add an option for save-analysis-csv for the legacy behaviour.
We also rename some bits and pieces `dxr` -> `save-analysis`
clarify documentation of TcpStream::connect() for multiple valid addresses
I am not sure how the UDP part of the stdlib behaves when passing multiple valid addresses, but it should be mentioned as there are legit use cases for [`impl<'a> ToSocketAddrs for &'a [SocketAddr]`](http://doc.rust-lang.org/nightly/std/net/trait.ToSocketAddrs.html), a TCP fallback only being one.
Just a little example program for anyone willing to enhance the documentation further:
```rust
use std::net::SocketAddr;
use std::net::ToSocketAddrs;
use std::net::TcpStream;
fn main()
{
let v: Vec<SocketAddr> = vec!
[
"127.0.0.1:1338".to_socket_addrs().unwrap().next().unwrap(),
"127.0.0.1:1337".to_socket_addrs().unwrap().next().unwrap(),
"127.0.0.1:1339".to_socket_addrs().unwrap().next().unwrap(),
];
let stream = TcpStream::connect(&v[..]).unwrap();
}
```
rustdoc: inline all the impls
This used to be done to avoid inlining impls referencing private items, but is now unnecessary since we actually check that impls do not reference non-doc-reachable items.
fixes#32881fixes#33025fixes#33113
r? @alexcrichton
Enable vfp3-d16 for ARMv7 Android target
Android's [armeabi-v7a ABI][1] guarantees at least VFPv3-d16 hardware FPU support, so Rust should include this in the default features for the `arm-linux-androideabi` target.
[1]: https://developer.android.com/ndk/guides/abis.html
Suppress fallback and ambiguity errors
If the infcx has observed other errors, then suppress both default type
parameter fallback (which can be unreliable, as the full constraint set
is not available) and errors related to unresovled
variables (annoyingly, integer type variables cannot currently be
unified with error, so that has to be a separate mechanism). Also add a
flag to `infcx` to allow us to independently indicate when we have
observed an error and hence should trigger this suppression mode.
Fixes#31997
cc @alexcrichton
r? @arielb1
It's likely that `rustdoc` as a tool is run concurrently in the same output
(e.g. documenting multiple crates as Cargo does), in which case it needs to
handle concurrent calls to `fs::create_dir`.
Make the `Iterator::enumerate` doc example more clear
The example uses integers for the value being iterated over, but the indices
added by `enumerate` are also integers, so I always end up double taking and
thinking harder than I should when parsing the documentation. I also always
forget which order the index and value are in the tuple so I frequently hit this
stumbling block. This commit changes the documentation to iterate over
characters so that it is immediately obvious which part of the tuple is the
index and which is the value.
Paths are mostly parsed without taking whitespaces into account, e.g. `std :: vec :: Vec :: new ()` parses successfully, however, there are some special cases involving keywords `super`, `self` and `Self`. For example, `self::` is considered a path start only if there are no spaces between `self` and `::`. These restrictions probably made sense when `self` and friends weren't keywords, but now they are unnecessary.
The first two commits remove this special treatment of whitespaces by removing `token::IdentStyle` entirely and therefore fix https://github.com/rust-lang/rust/issues/14109.
This change also affects naked `self` and `super` (which are not tightly followed by `::`, obviously) they can now be parsed as paths, however they are still not resolved correctly in imports (cc @jseyfried, see `compile-fail/use-keyword.rs`), so https://github.com/rust-lang/rust/issues/29036 is not completely fixed.
The third commit also makes `super`, `self`, `Self` and `static` keywords nominally (before this they acted as keywords for all purposes) and removes most of remaining \"special idents\".
The last commit (before tests) contains some small improvements - some qualified paths with type parameters are parsed correctly, `parse_path` is not used for parsing single identifiers, imports are sanity checked for absence of type parameters - such type parameters can be generated by syntax extensions or by macros when https://github.com/rust-lang/rust/issues/10415 is fixed (~~soon!~~already!).
This patch changes some pretty basic things in `libsyntax`, like `token::Token` and the keyword list, so it's a plugin-[breaking-change].
r? @eddyb
syntax: Merge PathParsingMode::NoTypesAllowed and PathParsingMode::ImportPrefix
syntax: Rename PathParsingMode and its variants to better express their purpose
syntax: Remove obsolete error message about 'self lifetime
syntax: Remove ALLOW_MODULE_PATHS workaround
syntax/resolve: Adjust some error messages
resolve: Compare unhygienic (not renamed) names with keywords::Invalid, invalid identifiers may appear to be valid after renaming