mirror of
https://github.com/servo/servo.git
synced 2025-08-02 20:20:14 +01:00
tidy: Fix rustdoc warnings and add a tidy check for a common URL issue (#33366)
This change fixes all rustdoc errors and also adds a tidy check for a very common rustdoc URL issue. Eventually rustdoc warnings should likely cause the build to fail, but this catches those issues sooner in order to not waste so much developer time. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
f6ae050077
commit
e70507ca40
19 changed files with 107 additions and 36 deletions
|
@ -625,7 +625,7 @@ impl AsCCharPtrPtr for [u8] {
|
|||
}
|
||||
}
|
||||
|
||||
/// https://searchfox.org/mozilla-central/rev/7279a1df13a819be254fd4649e07c4ff93e4bd45/dom/bindings/BindingUtils.cpp#3300
|
||||
/// <https://searchfox.org/mozilla-central/rev/7279a1df13a819be254fd4649e07c4ff93e4bd45/dom/bindings/BindingUtils.cpp#3300>
|
||||
pub unsafe extern "C" fn generic_static_promise_method(
|
||||
cx: *mut JSContext,
|
||||
argc: libc::c_uint,
|
||||
|
@ -646,7 +646,7 @@ pub unsafe extern "C" fn generic_static_promise_method(
|
|||
|
||||
/// Coverts exception to promise rejection
|
||||
///
|
||||
/// https://searchfox.org/mozilla-central/rev/b220e40ff2ee3d10ce68e07d8a8a577d5558e2a2/dom/bindings/BindingUtils.cpp#3315
|
||||
/// <https://searchfox.org/mozilla-central/rev/b220e40ff2ee3d10ce68e07d8a8a577d5558e2a2/dom/bindings/BindingUtils.cpp#3315>
|
||||
pub unsafe fn exception_to_promise(cx: *mut JSContext, rval: RawMutableHandleValue) -> bool {
|
||||
rooted!(in(cx) let mut exception = UndefinedValue());
|
||||
if !JS_GetPendingException(cx, exception.handle_mut()) {
|
||||
|
|
|
@ -49,7 +49,7 @@ impl FontFaceSet {
|
|||
}
|
||||
|
||||
impl FontFaceSetMethods for FontFaceSet {
|
||||
/// https://drafts.csswg.org/css-font-loading/#dom-fontfaceset-ready
|
||||
/// <https://drafts.csswg.org/css-font-loading/#dom-fontfaceset-ready>
|
||||
fn Ready(&self) -> Rc<Promise> {
|
||||
self.promise.clone()
|
||||
}
|
||||
|
|
|
@ -216,7 +216,7 @@ impl GPUBufferMethods for GPUBuffer {
|
|||
}
|
||||
}
|
||||
|
||||
/// https://gpuweb.github.io/gpuweb/#dom-gpubuffer-destroy
|
||||
/// <https://gpuweb.github.io/gpuweb/#dom-gpubuffer-destroy>
|
||||
fn Destroy(&self) {
|
||||
// Step 1
|
||||
self.Unmap();
|
||||
|
|
|
@ -202,7 +202,7 @@ impl GPUSupportedLimitsMethods for GPUSupportedLimits {
|
|||
pub fn set_limit(limits: &mut Limits, limit: &str, value: u64) -> bool {
|
||||
/// per spec defaults are lower bounds for values
|
||||
///
|
||||
/// https://www.w3.org/TR/webgpu/#limit-class-maximum
|
||||
/// <https://www.w3.org/TR/webgpu/#limit-class-maximum>
|
||||
fn set_maximum<T>(limit: &mut T, value: u64) -> bool
|
||||
where
|
||||
T: Ord + Copy + TryFrom<u64> + UpperBounded,
|
||||
|
|
|
@ -25,9 +25,9 @@ pub trait CollectionFilter: JSTraceable {
|
|||
fn filter<'a>(&self, elem: &'a Element, root: &'a Node) -> bool;
|
||||
}
|
||||
|
||||
/// An optional u32, using u32::MAX to represent None.
|
||||
/// It would be nicer just to use Option<u32> for this, but that would produce word
|
||||
/// alignment issues since Option<u32> uses 33 bits.
|
||||
/// An optional `u32`, using `u32::MAX` to represent None. It would be nicer
|
||||
/// just to use `Option<u32>`` for this, but that would produce word alignment
|
||||
/// issues since `Option<u32>`` uses 33 bits.
|
||||
#[derive(Clone, Copy, JSTraceable, MallocSizeOf)]
|
||||
struct OptionU32 {
|
||||
bits: u32,
|
||||
|
|
|
@ -217,7 +217,7 @@ enum ObservationState {
|
|||
Skipped,
|
||||
}
|
||||
|
||||
/// https://drafts.csswg.org/resize-observer/#resizeobservation
|
||||
/// <https://drafts.csswg.org/resize-observer/#resizeobservation>
|
||||
#[derive(JSTraceable, MallocSizeOf)]
|
||||
struct ResizeObservation {
|
||||
/// <https://drafts.csswg.org/resize-observer/#dom-resizeobservation-target>
|
||||
|
|
|
@ -78,17 +78,17 @@ impl ResizeObserverEntry {
|
|||
}
|
||||
|
||||
impl ResizeObserverEntryMethods for ResizeObserverEntry {
|
||||
/// https://drafts.csswg.org/resize-observer/#dom-resizeobserverentry-target
|
||||
/// <https://drafts.csswg.org/resize-observer/#dom-resizeobserverentry-target>
|
||||
fn Target(&self) -> DomRoot<Element> {
|
||||
DomRoot::from_ref(&*self.target)
|
||||
}
|
||||
|
||||
/// https://drafts.csswg.org/resize-observer/#dom-resizeobserverentry-contentrect
|
||||
/// <https://drafts.csswg.org/resize-observer/#dom-resizeobserverentry-contentrect>
|
||||
fn ContentRect(&self) -> DomRoot<DOMRectReadOnly> {
|
||||
DomRoot::from_ref(&*self.content_rect)
|
||||
}
|
||||
|
||||
/// https://drafts.csswg.org/resize-observer/#dom-resizeobserverentry-borderboxsize
|
||||
/// <https://drafts.csswg.org/resize-observer/#dom-resizeobserverentry-borderboxsize>
|
||||
fn BorderBoxSize(&self, cx: SafeJSContext) -> JSVal {
|
||||
let sizes: Vec<DomRoot<ResizeObserverSize>> = self
|
||||
.border_box_size
|
||||
|
@ -98,7 +98,7 @@ impl ResizeObserverEntryMethods for ResizeObserverEntry {
|
|||
to_frozen_array(sizes.as_slice(), cx)
|
||||
}
|
||||
|
||||
/// https://drafts.csswg.org/resize-observer/#dom-resizeobserverentry-contentboxsize
|
||||
/// <https://drafts.csswg.org/resize-observer/#dom-resizeobserverentry-contentboxsize>
|
||||
fn ContentBoxSize(&self, cx: SafeJSContext) -> JSVal {
|
||||
let sizes: Vec<DomRoot<ResizeObserverSize>> = self
|
||||
.content_box_size
|
||||
|
@ -108,7 +108,7 @@ impl ResizeObserverEntryMethods for ResizeObserverEntry {
|
|||
to_frozen_array(sizes.as_slice(), cx)
|
||||
}
|
||||
|
||||
/// https://drafts.csswg.org/resize-observer/#dom-resizeobserverentry-devicepixelcontentboxsize
|
||||
/// <https://drafts.csswg.org/resize-observer/#dom-resizeobserverentry-devicepixelcontentboxsize>
|
||||
fn DevicePixelContentBoxSize(&self, cx: SafeJSContext) -> JSVal {
|
||||
let sizes: Vec<DomRoot<ResizeObserverSize>> = self
|
||||
.device_pixel_content_box_size
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue