Rollup merge of #140076 - aDotInTheVoid:jsondocline, r=GuillaumeGomez
jsondocck: Require command is at start of line In one place we use `///``@``` instead of `//``@`.`` The test-runner allowed it, but it probably shouldn't. Ran into by ``@lolbinarycat`` in https://github.com/rust-lang/rust/pull/132748#issuecomment-2816469322: ``` error: unknown disambiguator `?(` ##[error] --> /checkout/tests/rustdoc-json/fns/return_type_alias.rs:3:25 | 3 | ///@ set foo = "$.index[?(``@.name=='Foo')].id"`` | ^^ | ``` Maybe it's also worth erroring on this like we added in #137103 r? ``@GuillaumeGomez``
This commit is contained in:
commit
df9e15e69f
2 changed files with 2 additions and 1 deletions
|
@ -154,6 +154,7 @@ impl CommandKind {
|
|||
static LINE_PATTERN: LazyLock<Regex> = LazyLock::new(|| {
|
||||
RegexBuilder::new(
|
||||
r#"
|
||||
^\s*
|
||||
//@\s+
|
||||
(?P<negated>!?)
|
||||
(?P<cmd>[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Regression test for <https://github.com/rust-lang/rust/issues/104851>
|
||||
|
||||
///@ set foo = "$.index[?(@.name=='Foo')].id"
|
||||
//@ set foo = "$.index[?(@.name=='Foo')].id"
|
||||
pub type Foo = i32;
|
||||
|
||||
//@ is "$.index[?(@.name=='demo')].inner.function.sig.output.resolved_path.id" $foo
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue