Skip to content

Commit db9d86b

Browse files
committed
Auto merge of #101639 - matthiaskrgr:rollup-sewkrgm, r=matthiaskrgr
Rollup of 6 pull requests Successful merges: - #101413 (Use RelocModel::Pic for UEFI targets) - #101595 (Fix ICE report flags display.) - #101616 (Adapt test for msan message change) - #101624 (rustdoc: remove unused CSS `#search { position: relative }`) - #101633 (Rustdoc-Json: Correcty handle intra-doc-links to items without HTML page) - #101634 (Rustdoc-Json Tests: Use ``@is`` and ``@ismany`` more often.) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2 parents cedd26b + 973059e commit db9d86b

File tree

21 files changed

+138
-78
lines changed

21 files changed

+138
-78
lines changed

compiler/rustc_driver/src/lib.rs

+7-4
Original file line numberDiff line numberDiff line change
@@ -1119,22 +1119,25 @@ fn extra_compiler_flags() -> Option<(Vec<String>, bool)> {
11191119
while let Some(arg) = args.next() {
11201120
if let Some(a) = ICE_REPORT_COMPILER_FLAGS.iter().find(|a| arg.starts_with(*a)) {
11211121
let content = if arg.len() == a.len() {
1122+
// A space-separated option, like `-C incremental=foo` or `--crate-type rlib`
11221123
match args.next() {
11231124
Some(arg) => arg.to_string(),
11241125
None => continue,
11251126
}
11261127
} else if arg.get(a.len()..a.len() + 1) == Some("=") {
1128+
// An equals option, like `--crate-type=rlib`
11271129
arg[a.len() + 1..].to_string()
11281130
} else {
1131+
// A non-space option, like `-Cincremental=foo`
11291132
arg[a.len()..].to_string()
11301133
};
1131-
if ICE_REPORT_COMPILER_FLAGS_EXCLUDE.iter().any(|exc| content.starts_with(exc)) {
1134+
let option = content.split_once('=').map(|s| s.0).unwrap_or(&content);
1135+
if ICE_REPORT_COMPILER_FLAGS_EXCLUDE.iter().any(|exc| option == *exc) {
11321136
excluded_cargo_defaults = true;
11331137
} else {
11341138
result.push(a.to_string());
1135-
match ICE_REPORT_COMPILER_FLAGS_STRIP_VALUE.iter().find(|s| content.starts_with(*s))
1136-
{
1137-
Some(s) => result.push(s.to_string()),
1139+
match ICE_REPORT_COMPILER_FLAGS_STRIP_VALUE.iter().find(|s| option == **s) {
1140+
Some(s) => result.push(format!("{}=[REDACTED]", s)),
11381141
None => result.push(content),
11391142
}
11401143
}

compiler/rustc_target/src/spec/tests/tests_impl.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,8 @@ impl Target {
146146
if self.position_independent_executables && !triple.ends_with("-linuxkernel") {
147147
assert_eq!(self.relocation_model, RelocModel::Pic);
148148
}
149-
if self.relocation_model == RelocModel::Pic {
149+
// The UEFI targets do not support dynamic linking but still require PIC (#101377).
150+
if self.relocation_model == RelocModel::Pic && self.os != "uefi" {
150151
assert!(self.dynamic_linking || self.position_independent_executables);
151152
}
152153
if self.static_position_independent_executables {

compiler/rustc_target/src/spec/uefi_msvc_base.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// code runs in the same environment, no process separation is supported.
1111

1212
use crate::spec::{LinkerFlavor, LldFlavor, PanicStrategy};
13-
use crate::spec::{RelocModel, StackProbeType, TargetOptions};
13+
use crate::spec::{StackProbeType, TargetOptions};
1414

1515
pub fn opts() -> TargetOptions {
1616
let mut base = super::msvc_base::opts();
@@ -47,7 +47,6 @@ pub fn opts() -> TargetOptions {
4747
stack_probes: StackProbeType::Call,
4848
singlethread: true,
4949
linker: Some("rust-lld".into()),
50-
relocation_model: RelocModel::Static,
5150
..base
5251
}
5352
}

src/librustdoc/clean/types.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ impl Item {
510510
.get(&self.item_id)
511511
.map_or(&[][..], |v| v.as_slice())
512512
.iter()
513-
.filter_map(|ItemLink { link: s, link_text, did, ref fragment }| {
513+
.filter_map(|ItemLink { link: s, link_text, page_id: did, ref fragment }| {
514514
debug!(?did);
515515
if let Ok((mut href, ..)) = href(*did, cx) {
516516
debug!(?href);
@@ -1134,7 +1134,10 @@ pub(crate) struct ItemLink {
11341134
/// This may not be the same as `link` if there was a disambiguator
11351135
/// in an intra-doc link (e.g. \[`fn@f`\])
11361136
pub(crate) link_text: String,
1137-
pub(crate) did: DefId,
1137+
/// The `DefId` of the Item whose **HTML Page** contains the item being
1138+
/// linked to. This will be different to `item_id` on item's that don't
1139+
/// have their own page, such as struct fields and enum variants.
1140+
pub(crate) page_id: DefId,
11381141
/// The url fragment to append to the link
11391142
pub(crate) fragment: Option<UrlFragment>,
11401143
}

src/librustdoc/html/static/css/rustdoc.css

-5
Original file line numberDiff line numberDiff line change
@@ -592,10 +592,6 @@ h2.location a {
592592
margin: 0;
593593
}
594594

595-
#search {
596-
position: relative;
597-
}
598-
599595
.search-loading {
600596
text-align: center;
601597
}
@@ -973,7 +969,6 @@ so that we can apply CSS-filters to change the arrow color in themes */
973969

974970
.search-results > a {
975971
display: block;
976-
width: 100%;
977972
/* A little margin ensures the browser's outlining of focused links has room to display. */
978973
margin-left: 2px;
979974
margin-right: 2px;

src/librustdoc/json/conversions.rs

+9-2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ use crate::clean::utils::print_const_expr;
1919
use crate::clean::{self, ItemId};
2020
use crate::formats::item_type::ItemType;
2121
use crate::json::JsonRenderer;
22+
use crate::passes::collect_intra_doc_links::UrlFragment;
2223

2324
impl JsonRenderer<'_> {
2425
pub(super) fn convert_item(&self, item: clean::Item) -> Option<Item> {
@@ -29,8 +30,14 @@ impl JsonRenderer<'_> {
2930
.get(&item.item_id)
3031
.into_iter()
3132
.flatten()
32-
.map(|clean::ItemLink { link, did, .. }| {
33-
(link.clone(), from_item_id((*did).into(), self.tcx))
33+
.map(|clean::ItemLink { link, page_id, fragment, .. }| {
34+
let id = match fragment {
35+
Some(UrlFragment::Item(frag_id)) => *frag_id,
36+
// FIXME: Pass the `UserWritten` segment to JSON consumer.
37+
Some(UrlFragment::UserWritten(_)) | None => *page_id,
38+
};
39+
40+
(link.clone(), from_item_id(id.into(), self.tcx))
3441
})
3542
.collect();
3643
let docs = item.attrs.collapsed_doc_value();

src/librustdoc/passes/collect_intra_doc_links.rs

+7-3
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,9 @@ enum MalformedGenerics {
223223
#[derive(Clone, Debug, Hash, PartialEq, Eq)]
224224
pub(crate) enum UrlFragment {
225225
Item(DefId),
226+
/// A part of a page that isn't a rust item.
227+
///
228+
/// Eg: `[Vector Examples](std::vec::Vec#examples)`
226229
UserWritten(String),
227230
}
228231

@@ -1127,7 +1130,7 @@ impl LinkCollector<'_, '_> {
11271130
Some(ItemLink {
11281131
link: ori_link.link.clone(),
11291132
link_text: link_text.clone(),
1130-
did: res.def_id(self.cx.tcx),
1133+
page_id: res.def_id(self.cx.tcx),
11311134
fragment,
11321135
})
11331136
}
@@ -1146,11 +1149,12 @@ impl LinkCollector<'_, '_> {
11461149
item,
11471150
&diag_info,
11481151
)?;
1149-
let id = clean::register_res(self.cx, rustc_hir::def::Res::Def(kind, id));
1152+
1153+
let page_id = clean::register_res(self.cx, rustc_hir::def::Res::Def(kind, id));
11501154
Some(ItemLink {
11511155
link: ori_link.link.clone(),
11521156
link_text: link_text.clone(),
1153-
did: id,
1157+
page_id,
11541158
fragment,
11551159
})
11561160
}

src/test/codegen/abi-efiapi.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ trait Freeze { }
2424
#[lang="copy"]
2525
trait Copy { }
2626

27-
//x86_64: define dso_local win64cc void @has_efiapi
27+
//x86_64: define win64cc void @has_efiapi
2828
//i686: define void @has_efiapi
2929
//aarch64: define dso_local void @has_efiapi
3030
//arm: define dso_local void @has_efiapi

src/test/rustdoc-gui/search-result-display.goml

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ press-key: 'Enter'
77
wait-for: "#crate-search"
88
// The width is returned by "getComputedStyle" which returns the exact number instead of the
99
// CSS rule which is "50%"...
10-
assert-css: (".search-results div.desc", {"width": "295px"})
10+
assert-css: (".search-results div.desc", {"width": "293px"})
1111
size: (600, 100)
1212
// As counter-intuitive as it may seem, in this width, the width is "100%", which is why
1313
// when computed it's larger.
14-
assert-css: (".search-results div.desc", {"width": "570px"})
14+
assert-css: (".search-results div.desc", {"width": "566px"})
1515

1616
// Check that the crate filter `<select>` is correctly handled when it goes to next line.
1717
// To do so we need to update the length of one of its `<option>`.

src/test/rustdoc-json/assoc_items.rs

+20-10
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,35 @@
33
pub struct Simple;
44

55
impl Simple {
6-
// @has "$.index[*][?(@.name=='CONSTANT')].kind" \"assoc_const\"
6+
// @is "$.index[*][?(@.name=='CONSTANT')].kind" \"assoc_const\"
77
pub const CONSTANT: usize = 0;
88
}
99

1010
pub trait EasyToImpl {
11-
// @has "$.index[*][?(@.name=='ToDeclare')].kind" \"assoc_type\"
12-
// @has "$.index[*][?(@.name=='ToDeclare')].inner.default" null
11+
// @is "$.index[*][?(@.docs=='ToDeclare trait')].kind" \"assoc_type\"
12+
// @is "$.index[*][?(@.docs=='ToDeclare trait')].inner.default" null
13+
// @is "$.index[*][?(@.docs=='ToDeclare trait')].inner.bounds" []
14+
/// ToDeclare trait
1315
type ToDeclare;
14-
// @has "$.index[*][?(@.name=='AN_ATTRIBUTE')].kind" \"assoc_const\"
15-
// @has "$.index[*][?(@.name=='AN_ATTRIBUTE')].inner.default" null
16+
// @is "$.index[*][?(@.docs=='AN_ATTRIBUTE trait')].kind" \"assoc_const\"
17+
// @is "$.index[*][?(@.docs=='AN_ATTRIBUTE trait')].inner.default" null
18+
// @is "$.index[*][?(@.docs=='AN_ATTRIBUTE trait')].inner.type.kind" '"primitive"'
19+
// @is "$.index[*][?(@.docs=='AN_ATTRIBUTE trait')].inner.type.inner" '"usize"'
20+
/// AN_ATTRIBUTE trait
1621
const AN_ATTRIBUTE: usize;
1722
}
1823

1924
impl EasyToImpl for Simple {
20-
// @has "$.index[*][?(@.name=='ToDeclare')].inner.default.kind" \"primitive\"
21-
// @has "$.index[*][?(@.name=='ToDeclare')].inner.default.inner" \"usize\"
25+
// @is "$.index[*][?(@.docs=='ToDeclare impl')].kind" '"assoc_type"'
26+
// @is "$.index[*][?(@.docs=='ToDeclare impl')].inner.default.kind" \"primitive\"
27+
// @is "$.index[*][?(@.docs=='ToDeclare impl')].inner.default.inner" \"usize\"
28+
/// ToDeclare impl
2229
type ToDeclare = usize;
23-
// @has "$.index[*][?(@.name=='AN_ATTRIBUTE')].inner.type.kind" \"primitive\"
24-
// @has "$.index[*][?(@.name=='AN_ATTRIBUTE')].inner.type.inner" \"usize\"
25-
// @has "$.index[*][?(@.name=='AN_ATTRIBUTE')].inner.default" \"12\"
30+
31+
// @is "$.index[*][?(@.docs=='AN_ATTRIBUTE impl')].kind" '"assoc_const"'
32+
// @is "$.index[*][?(@.docs=='AN_ATTRIBUTE impl')].inner.type.kind" \"primitive\"
33+
// @is "$.index[*][?(@.docs=='AN_ATTRIBUTE impl')].inner.type.inner" \"usize\"
34+
// @is "$.index[*][?(@.docs=='AN_ATTRIBUTE impl')].inner.default" \"12\"
35+
/// AN_ATTRIBUTE impl
2636
const AN_ATTRIBUTE: usize = 12;
2737
}

src/test/rustdoc-json/enums/variant_struct.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
// @has "$.index[*][?(@.name=='EnumStruct')].visibility" \"public\"
2-
// @has "$.index[*][?(@.name=='EnumStruct')].kind" \"enum\"
1+
// @is "$.index[*][?(@.name=='EnumStruct')].visibility" \"public\"
2+
// @is "$.index[*][?(@.name=='EnumStruct')].kind" \"enum\"
33
pub enum EnumStruct {
4-
// @has "$.index[*][?(@.name=='VariantS')].inner.variant_kind" \"struct\"
5-
// @has "$.index[*][?(@.name=='x')].kind" \"struct_field\"
6-
// @has "$.index[*][?(@.name=='y')].kind" \"struct_field\"
4+
// @is "$.index[*][?(@.name=='VariantS')].inner.variant_kind" \"struct\"
5+
// @is "$.index[*][?(@.name=='x')].kind" \"struct_field\"
6+
// @is "$.index[*][?(@.name=='y')].kind" \"struct_field\"
77
VariantS {
88
x: u32,
99
y: String,
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
// @has "$.index[*][?(@.name=='EnumTupleStruct')].visibility" \"public\"
2-
// @has "$.index[*][?(@.name=='EnumTupleStruct')].kind" \"enum\"
1+
// @is "$.index[*][?(@.name=='EnumTupleStruct')].visibility" \"public\"
2+
// @is "$.index[*][?(@.name=='EnumTupleStruct')].kind" \"enum\"
33
pub enum EnumTupleStruct {
4-
// @has "$.index[*][?(@.name=='VariantA')].inner.variant_kind" \"tuple\"
5-
// @has "$.index[*][?(@.name=='0')].kind" \"struct_field\"
6-
// @has "$.index[*][?(@.name=='1')].kind" \"struct_field\"
4+
// @is "$.index[*][?(@.name=='VariantA')].inner.variant_kind" \"tuple\"
5+
// @is "$.index[*][?(@.name=='0')].kind" \"struct_field\"
6+
// @is "$.index[*][?(@.name=='1')].kind" \"struct_field\"
77
VariantA(u32, String),
88
}

src/test/rustdoc-json/fns/generics.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@ pub trait Wham {}
99
// @is "$.index[*][?(@.name=='one_generic_param_fn')].inner.generics.where_predicates" []
1010
// @count "$.index[*][?(@.name=='one_generic_param_fn')].inner.generics.params[*]" 1
1111
// @is "$.index[*][?(@.name=='one_generic_param_fn')].inner.generics.params[0].name" '"T"'
12-
// @has "$.index[*][?(@.name=='one_generic_param_fn')].inner.generics.params[0].kind.type.synthetic" false
13-
// @has "$.index[*][?(@.name=='one_generic_param_fn')].inner.generics.params[0].kind.type.bounds[0].trait_bound.trait.id" $wham_id
12+
// @is "$.index[*][?(@.name=='one_generic_param_fn')].inner.generics.params[0].kind.type.synthetic" false
13+
// @is "$.index[*][?(@.name=='one_generic_param_fn')].inner.generics.params[0].kind.type.bounds[0].trait_bound.trait.id" $wham_id
1414
// @is "$.index[*][?(@.name=='one_generic_param_fn')].inner.decl.inputs" '[["w", {"inner": "T", "kind": "generic"}]]'
1515
pub fn one_generic_param_fn<T: Wham>(w: T) {}
1616

1717
// @is "$.index[*][?(@.name=='one_synthetic_generic_param_fn')].inner.generics.where_predicates" []
1818
// @count "$.index[*][?(@.name=='one_synthetic_generic_param_fn')].inner.generics.params[*]" 1
1919
// @is "$.index[*][?(@.name=='one_synthetic_generic_param_fn')].inner.generics.params[0].name" '"impl Wham"'
20-
// @has "$.index[*][?(@.name=='one_synthetic_generic_param_fn')].inner.generics.params[0].kind.type.synthetic" true
21-
// @has "$.index[*][?(@.name=='one_synthetic_generic_param_fn')].inner.generics.params[0].kind.type.bounds[0].trait_bound.trait.id" $wham_id
20+
// @is "$.index[*][?(@.name=='one_synthetic_generic_param_fn')].inner.generics.params[0].kind.type.synthetic" true
21+
// @is "$.index[*][?(@.name=='one_synthetic_generic_param_fn')].inner.generics.params[0].kind.type.bounds[0].trait_bound.trait.id" $wham_id
2222
// @count "$.index[*][?(@.name=='one_synthetic_generic_param_fn')].inner.decl.inputs[*]" 1
2323
// @is "$.index[*][?(@.name=='one_synthetic_generic_param_fn')].inner.decl.inputs[0][0]" '"w"'
2424
// @is "$.index[*][?(@.name=='one_synthetic_generic_param_fn')].inner.decl.inputs[0][1].kind" '"impl_trait"'

src/test/rustdoc-json/impls/import_from_private.rs

+4-6
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ mod bar {
1616
// @set import = "$.index[*][?(@.kind=='import')].id"
1717
pub use bar::Baz;
1818

19-
// FIXME(adotinthevoid): Use hasexact once #99474 lands
20-
21-
// @has "$.index[*][?(@.kind=='module')].inner.items[*]" $import
22-
// @is "$.index[*][?(@.kind=='import')].inner.id" $baz
23-
// @has "$.index[*][?(@.kind=='struct')].inner.impls[*]" $impl
24-
// @has "$.index[*][?(@.kind=='impl')].inner.items[*]" $doit
19+
// @is "$.index[*][?(@.kind=='module')].inner.items[*]" $import
20+
// @is "$.index[*][?(@.kind=='import')].inner.id" $baz
21+
// @is "$.index[*][?(@.kind=='struct')].inner.impls[*]" $impl
22+
// @is "$.index[*][?(@.kind=='impl')].inner.items[*]" $doit
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
// Regression test for <https://github.com/rust-lang/rust/issues/101531>,
2+
// where links where to the item who's HTML page had the item linked to.
3+
4+
//! [`Struct::struct_field`]
5+
//! [`Enum::Variant`]
6+
//! [`Trait::AssocType`]
7+
//! [`Trait::ASSOC_CONST`]
8+
//! [`Trait::method`]
9+
10+
// @set struct_field = "$.index[*][?(@.name=='struct_field')].id"
11+
// @set Variant = "$.index[*][?(@.name=='Variant')].id"
12+
// @set AssocType = "$.index[*][?(@.name=='AssocType')].id"
13+
// @set ASSOC_CONST = "$.index[*][?(@.name=='ASSOC_CONST')].id"
14+
// @set method = "$.index[*][?(@.name=='method')].id"
15+
16+
// @is "$.index[*][?(@.name=='non_page')].links['`Struct::struct_field`']" $struct_field
17+
// @is "$.index[*][?(@.name=='non_page')].links['`Enum::Variant`']" $Variant
18+
// @is "$.index[*][?(@.name=='non_page')].links['`Trait::AssocType`']" $AssocType
19+
// @is "$.index[*][?(@.name=='non_page')].links['`Trait::ASSOC_CONST`']" $ASSOC_CONST
20+
// @is "$.index[*][?(@.name=='non_page')].links['`Trait::method`']" $method
21+
22+
pub struct Struct {
23+
pub struct_field: i32,
24+
}
25+
26+
pub enum Enum {
27+
Variant(),
28+
}
29+
30+
pub trait Trait {
31+
const ASSOC_CONST: i32;
32+
type AssocType;
33+
fn method();
34+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
//! For motivation, see [the reasons](foo#reasons)
2+
3+
/// # Reasons
4+
/// To test rustdoc json
5+
pub fn foo() {}
6+
7+
// @set foo = "$.index[*][?(@.name=='foo')].id"
8+
// @is "$.index[*][?(@.name=='user_written')].links['foo#reasons']" $foo

src/test/rustdoc-json/primitives.rs

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
#![feature(never_type)]
22

3-
// @has "$.index[*][?(@.name=='PrimNever')].visibility" \"public\"
4-
// @has "$.index[*][?(@.name=='PrimNever')].inner.type.kind" \"primitive\"
5-
// @has "$.index[*][?(@.name=='PrimNever')].inner.type.inner" \"never\"
3+
// @is "$.index[*][?(@.name=='PrimNever')].visibility" \"public\"
4+
// @is "$.index[*][?(@.name=='PrimNever')].inner.type.kind" \"primitive\"
5+
// @is "$.index[*][?(@.name=='PrimNever')].inner.type.inner" \"never\"
66
pub type PrimNever = !;
77

8-
// @has "$.index[*][?(@.name=='PrimStr')].inner.type.kind" \"primitive\"
9-
// @has "$.index[*][?(@.name=='PrimStr')].inner.type.inner" \"str\"
8+
// @is "$.index[*][?(@.name=='PrimStr')].inner.type.kind" \"primitive\"
9+
// @is "$.index[*][?(@.name=='PrimStr')].inner.type.inner" \"str\"
1010
pub type PrimStr = str;
1111

12-
// @has "$.index[*][?(@.name=='PrimBool')].inner.type.kind" \"primitive\"
13-
// @has "$.index[*][?(@.name=='PrimBool')].inner.type.inner" \"bool\"
12+
// @is "$.index[*][?(@.name=='PrimBool')].inner.type.kind" \"primitive\"
13+
// @is "$.index[*][?(@.name=='PrimBool')].inner.type.inner" \"bool\"
1414
pub type PrimBool = bool;
1515

16-
// @has "$.index[*][?(@.name=='PrimChar')].inner.type.kind" \"primitive\"
17-
// @has "$.index[*][?(@.name=='PrimChar')].inner.type.inner" \"char\"
16+
// @is "$.index[*][?(@.name=='PrimChar')].inner.type.kind" \"primitive\"
17+
// @is "$.index[*][?(@.name=='PrimChar')].inner.type.inner" \"char\"
1818
pub type PrimChar = char;
1919

20-
// @has "$.index[*][?(@.name=='PrimU8')].inner.type.kind" \"primitive\"
21-
// @has "$.index[*][?(@.name=='PrimU8')].inner.type.inner" \"u8\"
20+
// @is "$.index[*][?(@.name=='PrimU8')].inner.type.kind" \"primitive\"
21+
// @is "$.index[*][?(@.name=='PrimU8')].inner.type.inner" \"u8\"
2222
pub type PrimU8 = u8;
+7-7
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
// @has "$.index[*][?(@.name=='Foo')]"
22
pub trait Foo {
3-
// @has "$.index[*][?(@.name=='no_self')].inner.has_body" false
3+
// @is "$.index[*][?(@.name=='no_self')].inner.has_body" false
44
fn no_self();
5-
// @has "$.index[*][?(@.name=='move_self')].inner.has_body" false
5+
// @is "$.index[*][?(@.name=='move_self')].inner.has_body" false
66
fn move_self(self);
7-
// @has "$.index[*][?(@.name=='ref_self')].inner.has_body" false
7+
// @is "$.index[*][?(@.name=='ref_self')].inner.has_body" false
88
fn ref_self(&self);
99

10-
// @has "$.index[*][?(@.name=='no_self_def')].inner.has_body" true
10+
// @is "$.index[*][?(@.name=='no_self_def')].inner.has_body" true
1111
fn no_self_def() {}
12-
// @has "$.index[*][?(@.name=='move_self_def')].inner.has_body" true
12+
// @is "$.index[*][?(@.name=='move_self_def')].inner.has_body" true
1313
fn move_self_def(self) {}
14-
// @has "$.index[*][?(@.name=='ref_self_def')].inner.has_body" true
14+
// @is "$.index[*][?(@.name=='ref_self_def')].inner.has_body" true
1515
fn ref_self_def(&self) {}
1616
}
1717

1818
pub trait Bar: Clone {
19-
// @has "$.index[*][?(@.name=='method')].inner.has_body" false
19+
// @is "$.index[*][?(@.name=='method')].inner.has_body" false
2020
fn method(&self, param: usize);
2121
}

0 commit comments

Comments
 (0)