mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-02 18:27:37 +00:00

1. rustdoc::bare_urls doesn't output invalid suggestions if source_span_for_markdown_range fails to find a span 2. source_span_for_markdown_range tries harder to return a span by applying an additional diagnostic fixes https://github.com/rust-lang/rust/issues/135851
13 lines
391 B
Rust
13 lines
391 B
Rust
//@ check-fail
|
|
|
|
#![deny(rustdoc::bare_urls)]
|
|
|
|
// examples of bare urls that are beyond our ability to generate suggestions for
|
|
|
|
// this falls through every heuristic in `source_span_for_markdown_range`,
|
|
// and thus does not get any suggestion.
|
|
#[doc = "good: <https://example.com/> \n\n"]
|
|
//~^ ERROR this URL is not a hyperlink
|
|
#[doc = "bad: https://example.com/"]
|
|
pub fn duplicate_raw() {}
|