Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 10 pull requests #74114

Closed
wants to merge 26 commits into from

Conversation

Dylan-DPC-zz
Copy link

Successful merges:

Failed merges:

r? @ghost

Azhng and others added 26 commits June 29, 2020 16:46
This commit modifies the Place as follow:
* remove 'ty' from ProjectionKind
* add type information into to Projection
* replace 'ty' in Place with 'base_ty'
* introduce 'ty()' in `Place` to return the final type of the `Place`
* introduce `ty_before_projection()` in `Place` to return the type of
  a `Place` before i'th projection is applied

Closes rust-lang/project-rfc-2229#5
Enclose unsafe operations in unsafe blocks
we used to erase the local just before we tried to read it for diagnostics
This causes the components of FQN's to behave similarly to other links
in the contents of rustdoc-styled pages.

I (and I hope others at least in part) have found the prior design to be
somewhat confusing, as it is not clear (upon hovering) that the various
parts of the FQN are actually links that the user can navigate to.

In short, this patch makes links in the FQN have an underline when the
user hovers over them, more clearly indicating that they can be used for
navigation.

Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com>
Since rust-lang#73374 the rustc wrapper no longer configures debug assertions
based on RUSTC_DEBUG_ASSERTIONS environment variable.
This adds `read_exact_at` and `write_all_at` to WASI's `FileExt`,
similar to the Unix versions of the same names.
This adjusts the return type of Windows' `OpenOptionsExt::security_qos_flags`
to be consistent with the other functions in the trait.
Previously, if there were a module in scope with the same name as the
primitive, that would take precedence. Coupled with
rust-lang#58699, this made it impossible
to link to the primitive when that module was in scope.

This approach could be extended so that `struct@foo` would no longer resolve
to any type, etc. However, it could not be used for glob imports:

```rust
pub mod foo {
  pub struct Bar;
}

pub enum Bar {}
use foo::*;

// This is expected to link to `inner::Bar`, but instead it will link to the enum.
/// Link to [struct@Bar]
pub struct MyDocs;
```

The reason for this is that this change does not affect the resolution
algorithm of rustc_resolve at all. The only reason we could special-case
primitives is because we have a list of all possible primitives ahead of time.
…r=ollie27,kinnison

[rustdoc] Page hash handling

Fixes rust-lang#70476

A good example to see the change is to use this URL: https://doc.rust-lang.org/nightly/std/string/struct.String.html#from_iter.v-3

After the change, it actually goes to the target element (and change the page hash to something more clear for the users).

r? @kinnison

cc @ollie27
…tsakis

typeck: adding type information to projection

This commit modifies the Place as follow:
* remove 'ty' from ProjectionKind
* add type information into to Projection
* replace 'ty' in Place with 'base_ty'
* introduce 'ty()' in `Place` to return the final type of the `Place`
* introduce `ty_before_projection()` in `Place` to return the type of
  a `Place` before i'th projection is applied

Closes rust-lang/project-rfc-2229#5
libstd/net/tcp.rs: #![deny(unsafe_op_in_unsafe_fn)]

Enclose unsafe operations in unsafe blocks for net/tcp.rs. Fixes part of rust-lang#73904.
…GuillaumeGomez

rustdoc: Restore underline text decoration on hover for FQN in header

This causes the components of FQN's (e.g. `std`, `net`, and `Ipv4Addr` of the FQN `std::net::Ipv4Addr`) to behave similarly to other links in the contents of rustdoc-styled pages. When the user hovers over them, more clearly indicating that they can be used for navigation.

I (and I hope others at least in part) have found the prior design to be somewhat confusing, as it is not clear (upon hovering) that the various parts of the FQN are actually links that the user can navigate to.

<details><summary>📸 Before, mouse hovered over "net" in the FQN</summary>
<img alt="A rustdoc page with the mouse hovered over the fully-qualified name in the page header, producing no visual change" src="https://user-images.githubusercontent.com/1566689/86538363-4c827000-bebb-11ea-8291-5ea6b85d7e19.png" />
</details>
<details><summary>📸 After, mouse hovered over "net" in the FQN</summary>
<img alt="A rustdoc page with the mouse hovered over the fully-qualified name in the page header, now with an underline showing up under the word hovered over by the mouse" src="https://user-images.githubusercontent.com/1566689/86538471-d3374d00-bebb-11ea-9bb3-7aa2d7a4800b.png" />
</details>
…return-type, r=LukasKalbertodt

Fix the return type of Windows' `OpenOptionsExt::security_qos_flags`.

This adjusts the return type of Windows' `OpenOptionsExt::security_qos_flags`
to be consistent with the other functions in the trait.
…, r=alexcrichton

Add `read_exact_at` and `write_all_at` to WASI's `FileExt`

This adds `read_exact_at` and `write_all_at` to WASI's `FileExt`,
similar to the Unix versions of the same names.
Always resolve type@primitive as a primitive, not a module

Previously, if there were a module in scope with the same name as the
primitive, that would take precedence. Coupled with
rust-lang#58699, this made it impossible
to link to the primitive when that module was in scope.

This approach could be extended so that `struct@foo` would no longer resolve
to any type, etc. However, it could not be used for glob imports:

```rust
pub mod foo {
  pub struct Bar;
}

pub enum Bar {}
use foo::*;

// This is expected to link to `inner::Bar`, but instead it will link to the enum.
/// Link to [struct@Bar]
pub struct MyDocs;
```

The reason for this is that this change does not affect the resolution
algorithm of rustc_resolve at all. The only reason we could special-case
primitives is because we have a list of all possible primitives ahead of time.

Closes rust-lang#74063

r? @Manishearth
…alfJung

Remove unused RUSTC_DEBUG_ASSERTIONS

Since rust-lang#73374 the rustc wrapper no longer configures debug assertions
based on RUSTC_DEBUG_ASSERTIONS environment variable.

r? @RalfJung
Fix const prop ICE

we used to erase the local just before we tried to read it for diagnostics

fixes rust-lang#73993

r? @wesleywiser
Expand abbreviation in core::ffi description
@Dylan-DPC-zz
Copy link
Author

@bors r+ rollup=never p=10

@bors
Copy link
Contributor

bors commented Jul 6, 2020

📌 Commit f36490d has been approved by Dylan-DPC

@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 Jul 6, 2020
@Manishearth
Copy link
Member

@bors r-

#74076 was dequeued

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jul 6, 2020
@Dylan-DPC-zz Dylan-DPC-zz deleted the rollup-s6ht3ky branch July 7, 2020 01:13
@Dylan-DPC-zz Dylan-DPC-zz restored the rollup-s6ht3ky branch July 7, 2020 01:13
@Dylan-DPC-zz Dylan-DPC-zz deleted the rollup-s6ht3ky branch July 7, 2020 01:13
@Dylan-DPC-zz Dylan-DPC-zz restored the rollup-s6ht3ky branch July 7, 2020 01:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.