rustdoc: Fix many rustdoc errors (#31147)

This fixes many rustdoc errors that occur due to raw URLs in rustdoc
comments as well as unescaped Rust code that should be in backticks.
This commit is contained in:
Martin Robinson 2024-01-22 14:13:48 +01:00 committed by GitHub
parent d7de206dbd
commit 5c1723c983
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
185 changed files with 939 additions and 942 deletions

View file

@ -131,7 +131,7 @@ use crate::timers::{
#[derive(JSTraceable)]
pub struct AutoCloseWorker {
/// https://html.spec.whatwg.org/multipage/#dom-workerglobalscope-closing
/// <https://html.spec.whatwg.org/multipage/#dom-workerglobalscope-closing>
closing: Arc<AtomicBool>,
/// A handle to join on the worker thread.
join_handle: Option<JoinHandle<()>>,
@ -207,7 +207,7 @@ pub struct GlobalScope {
console_timers: DomRefCell<HashMap<DOMString, Instant>>,
/// module map is used when importing JavaScript modules
/// https://html.spec.whatwg.org/multipage/#concept-settings-object-module-map
/// <https://html.spec.whatwg.org/multipage/#concept-settings-object-module-map>
#[ignore_malloc_size_of = "mozjs"]
module_map: DomRefCell<HashMapTracedValues<ServoUrl, Rc<ModuleTree>>>,
@ -257,7 +257,7 @@ pub struct GlobalScope {
#[no_trace]
origin: MutableOrigin,
/// https://html.spec.whatwg.org/multipage/#concept-environment-creation-url
/// <https://html.spec.whatwg.org/multipage/#concept-environment-creation-url>
#[no_trace]
creation_url: Option<ServoUrl>,
@ -442,7 +442,7 @@ pub struct ManagedMessagePort {
pub enum BroadcastChannelState {
/// The broadcast-channel router id for this global, and a queue of managed channels.
/// Step 9, "sort destinations"
/// of https://html.spec.whatwg.org/multipage/#dom-broadcastchannel-postmessage
/// of <https://html.spec.whatwg.org/multipage/#dom-broadcastchannel-postmessage>
/// requires keeping track of creation order, hence the queue.
Managed(
#[no_trace] BroadcastChannelRouterId,
@ -1339,7 +1339,7 @@ impl GlobalScope {
}
}
/// https://html.spec.whatwg.org/multipage/#ports-and-garbage-collection
/// <https://html.spec.whatwg.org/multipage/#ports-and-garbage-collection>
pub fn perform_a_message_port_garbage_collection_checkpoint(&self) {
let is_empty = if let MessagePortState::Managed(_id, message_ports) =
&mut *self.message_port_state.borrow_mut()
@ -1373,7 +1373,7 @@ impl GlobalScope {
/// Remove broadcast-channels that are closed.
/// TODO: Also remove them if they do not have an event-listener.
/// see https://github.com/servo/servo/issues/25772
/// see <https://github.com/servo/servo/issues/25772>
pub fn perform_a_broadcast_channel_garbage_collection_checkpoint(&self) {
let is_empty = if let BroadcastChannelState::Managed(router_id, ref mut channels) =
&mut *self.broadcast_channel_state.borrow_mut()
@ -1791,7 +1791,7 @@ impl GlobalScope {
}
}
/// https://w3c.github.io/FileAPI/#dfn-size
/// <https://w3c.github.io/FileAPI/#dfn-size>
pub fn get_blob_size(&self, blob_id: &BlobId) -> u64 {
let blob_state = self.blob_state.borrow();
if let BlobState::Managed(blobs_map) = &*blob_state {
@ -3055,7 +3055,7 @@ impl GlobalScope {
false
}
/// https://www.w3.org/TR/CSP/#get-csp-of-object
/// <https://www.w3.org/TR/CSP/#get-csp-of-object>
pub fn get_csp_list(&self) -> Option<CspList> {
if let Some(window) = self.downcast::<Window>() {
return window.Document().get_csp_list().map(|c| c.clone());