Skip to content

Invalid "unclosed HTML tag" lint #79095

Closed
@GuillaumeGomez

Description

@GuillaumeGomez

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.

Metadata

Metadata

Labels

A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.C-bugCategory: This is a bug.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions