mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 14:51:48 +00:00
Remove Substs from Ty::ForeignType
This commit is contained in:
parent
0e995adcf6
commit
a3fd2faba5
5 changed files with 9 additions and 18 deletions
|
@ -169,7 +169,7 @@ pub enum Ty {
|
|||
Closure { def: DefWithBodyId, expr: ExprId, substs: Substs },
|
||||
|
||||
/// Represents a foreign type declared in external blocks.
|
||||
ForeignType(TypeAliasId, Substs),
|
||||
ForeignType(TypeAliasId),
|
||||
|
||||
/// A pointer to a function. Written as `fn() -> i32`.
|
||||
///
|
||||
|
@ -755,7 +755,6 @@ impl Ty {
|
|||
| Ty::Tuple(_, substs)
|
||||
| Ty::OpaqueType(_, substs)
|
||||
| Ty::AssociatedType(_, substs)
|
||||
| Ty::ForeignType(_, substs)
|
||||
| Ty::Closure { substs, .. } => {
|
||||
assert_eq!(substs.len(), new_substs.len());
|
||||
*substs = new_substs;
|
||||
|
@ -779,7 +778,6 @@ impl Ty {
|
|||
| Ty::Tuple(_, substs)
|
||||
| Ty::OpaqueType(_, substs)
|
||||
| Ty::AssociatedType(_, substs)
|
||||
| Ty::ForeignType(_, substs)
|
||||
| Ty::Closure { substs, .. } => Some(substs),
|
||||
_ => None,
|
||||
}
|
||||
|
@ -797,7 +795,6 @@ impl Ty {
|
|||
| Ty::Tuple(_, substs)
|
||||
| Ty::OpaqueType(_, substs)
|
||||
| Ty::AssociatedType(_, substs)
|
||||
| Ty::ForeignType(_, substs)
|
||||
| Ty::Closure { substs, .. } => Some(substs),
|
||||
_ => None,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue