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 9 pull requests #105444

Closed
wants to merge 37 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
7674ede
Detect long types in E0308 and write them to disk
estebank Nov 26, 2022
360c0a7
Tweak shortening logic to be less trigger happy
estebank Nov 26, 2022
73b371a
Further tweak the type shortening logic
estebank Nov 26, 2022
be02bd9
Remove unneeded test change
estebank Nov 26, 2022
360bcb6
fix test
estebank Nov 26, 2022
34b3c49
fix rebase
estebank Nov 28, 2022
427a079
kmc-solid: Use `expose_addr` and `from_exposed_addr` for pointer-inte…
kawadakk Dec 1, 2022
47f2f6d
kmc-solid: Add a stub implementation of `is_terminal`
kawadakk Dec 1, 2022
f482e55
kmc-solid: Address compiler warnings
kawadakk Dec 1, 2022
ae7633f
kmc-solid: Don't do `Box::from_raw(&*(x: Box<T>) as *const T as *mut T)`
kawadakk Dec 1, 2022
e2d41f4
Make nested RPITIT inherit the parent opaque's generics.
cjgillot Dec 4, 2022
9397ea1
make retagging work even with 'unstable' places
RalfJung Dec 5, 2022
34c58e8
Stacked Borrows: factor the logic determining the new permissions on …
RalfJung Dec 5, 2022
e9dd591
Add help for `#![feature(impl_trait_in_fn_trait_return)]`
cuviper Dec 7, 2022
0669379
Don't silently ignore errors that happen during rendering
GuillaumeGomez Dec 7, 2022
eef61b4
Update rustdoc test to check its error output
GuillaumeGomez Dec 7, 2022
6ccd14a
Improve several aspects of the Rustdoc scrape-examples UI.
willcrichton Nov 27, 2022
acd70e6
Add explanations to scrape-examples integration test
willcrichton Dec 6, 2022
4574217
Only put title over example on large screens
willcrichton Dec 6, 2022
679d7ea
Include additional documentation for scrape-examples changes
willcrichton Dec 6, 2022
212d03d
Factor scrape-examples toggle test into a new file
willcrichton Dec 6, 2022
ae270f1
Update scrape-examples help, fix documentation typos
willcrichton Dec 6, 2022
bcdab87
Fix es-check
willcrichton Dec 6, 2022
0709e53
Fix rustdoc error with no providec crate-type, fix scrape examples bu…
willcrichton Dec 6, 2022
8a45938
Revert crate_types change, add new bin_crate field
willcrichton Dec 6, 2022
9499d2c
Improve calculation of scraped example minimized height
willcrichton Dec 7, 2022
8bc30cb
CI: add missing line continuation marker
ComputerDruid Dec 7, 2022
a3c4c2e
Fix warning when libcore is compiled with no_fp_fmt_parse
nbdd0121 Dec 8, 2022
27c0dd6
Rollup merge of #104922 - estebank:fur-elize, r=oli-obk
matthiaskrgr Dec 8, 2022
ee74286
Rollup merge of #105120 - solid-rs:patch/kmc-solid/maintainance, r=th…
matthiaskrgr Dec 8, 2022
b47fc78
Rollup merge of #105255 - cjgillot:issue-105197, r=compiler-errors
matthiaskrgr Dec 8, 2022
55e07fd
Rollup merge of #105317 - RalfJung:retag-rework, r=oli-obk
matthiaskrgr Dec 8, 2022
23ea785
Rollup merge of #105387 - willcrichton:scrape-examples-ui-improvement…
matthiaskrgr Dec 8, 2022
616a11a
Rollup merge of #105408 - cuviper:help-rpitirpit, r=compiler-errors
matthiaskrgr Dec 8, 2022
b475163
Rollup merge of #105427 - GuillaumeGomez:dont-silently-ignore-rustdoc…
matthiaskrgr Dec 8, 2022
9289c92
Rollup merge of #105433 - ComputerDruid:docker_continuation_fix, r=jy…
matthiaskrgr Dec 8, 2022
a147868
Rollup merge of #105434 - nbdd0121:lib, r=thomcc
matthiaskrgr Dec 8, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Make nested RPITIT inherit the parent opaque's generics.
  • Loading branch information
cjgillot committed Dec 4, 2022
commit e2d41f4c974f0cc09e5aafb02883f222487610f9
16 changes: 1 addition & 15 deletions compiler/rustc_hir_analysis/src/collect/generics_of.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ use hir::{
GenericParamKind, HirId, Node,
};
use rustc_hir as hir;
use rustc_hir::def::DefKind;
use rustc_hir::def_id::DefId;
use rustc_middle::ty::{self, TyCtxt};
use rustc_session::lint;
Expand Down Expand Up @@ -143,20 +142,7 @@ pub(super) fn generics_of(tcx: TyCtxt<'_>, def_id: DefId) -> ty::Generics {
Some(tcx.typeck_root_def_id(def_id))
}
Node::Item(item) => match item.kind {
ItemKind::OpaqueTy(hir::OpaqueTy {
origin:
hir::OpaqueTyOrigin::FnReturn(fn_def_id) | hir::OpaqueTyOrigin::AsyncFn(fn_def_id),
in_trait,
..
}) => {
if in_trait {
assert!(matches!(tcx.def_kind(fn_def_id), DefKind::AssocFn))
} else {
assert!(matches!(tcx.def_kind(fn_def_id), DefKind::AssocFn | DefKind::Fn))
}
Some(fn_def_id.to_def_id())
}
ItemKind::OpaqueTy(hir::OpaqueTy { origin: hir::OpaqueTyOrigin::TyAlias, .. }) => {
ItemKind::OpaqueTy(hir::OpaqueTy { .. }) => {
let parent_id = tcx.hir().get_parent_item(hir_id);
assert_ne!(parent_id, hir::CRATE_OWNER_ID);
debug!("generics_of: parent of opaque ty {:?} is {:?}", def_id, parent_id);
Expand Down
17 changes: 17 additions & 0 deletions src/test/ui/async-await/in-trait/nested-rpit.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// check-pass
// edition: 2021

#![feature(async_fn_in_trait)]
#![feature(return_position_impl_trait_in_trait)]
#![allow(incomplete_features)]

use std::future::Future;
use std::marker::PhantomData;

trait Lockable<K, V> {
async fn lock_all_entries(&self) -> impl Future<Output = Guard<'_>>;
}

struct Guard<'a>(PhantomData<&'a ()>);

fn main() {}