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

Invalid "unclosed HTML tag" lint #79095

Closed
GuillaumeGomez opened this issue Nov 16, 2020 · 0 comments · Fixed by #79097
Closed

Invalid "unclosed HTML tag" lint #79095

GuillaumeGomez opened this issue Nov 16, 2020 · 0 comments · Fixed by #79097
Assignees
Labels
A-lint Area: Lints (warnings about flaws in source code) such as unused_mut. C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@GuillaumeGomez
Copy link
Member

On this doc comment:

//! ```no_run
//! extern crate gtk;
//! extern crate gio;
//!
//! // To import all needed traits.
//! use gtk::prelude::*;
//! use gio::prelude::*;
//!
//! use std::env;
//!
//! fn main() {
//!     let uiapp = gtk::Application::new(Some("org.gtkrsnotes.demo"),
//!                                       gio::ApplicationFlags::FLAGS_NONE)
//!                                  .expect("Application::new failed");
//!     uiapp.connect_activate(|app| {
//!         // We create the main window.
//!         let win = gtk::ApplicationWindow::new(app);
//!
//!         // Then we set its size and a title.
//!         win.set_default_size(320, 200);
//!         win.set_title("Basic example");
//!
//!         // Don't forget to make all widgets visible.
//!         win.show_all();
//!     });
//!     uiapp.run(&env::args().collect::<Vec<_>>());
//! }
//! ```

We receive the warning:

warning: unclosed HTML tag `Vec`
  --> gtk/src/lib.rs:80:41
   |
80 | //!     uiapp.run(&env::args().collect::<Vec<_>>());
   |                                         ^^^^
   |
   = note: `-W invalid-html-tags` implied by `-W rustdoc`

Or it shouldn't because it's in a code block.

@GuillaumeGomez GuillaumeGomez added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. C-bug Category: This is a bug. labels Nov 16, 2020
@GuillaumeGomez GuillaumeGomez self-assigned this Nov 16, 2020
@jyn514 jyn514 added the A-lint Area: Lints (warnings about flaws in source code) such as unused_mut. label Nov 16, 2020
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue Nov 17, 2020
…tml-tag-lint, r=jyn514

Code block invalid html tag lint

Fixes rust-lang#79095

r? `@jyn514`
m-ou-se added a commit to m-ou-se/rust that referenced this issue Nov 17, 2020
…tml-tag-lint, r=jyn514

Code block invalid html tag lint

Fixes rust-lang#79095

r? ``@jyn514``
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lint Area: Lints (warnings about flaws in source code) such as unused_mut. C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants