@@ -281,6 +281,13 @@ impl Url {
281281 /// # }
282282 /// # run().unwrap();
283283 /// ```
284+ ///
285+ /// # Errors
286+ ///
287+ /// If the function can not parse an absolute URL from the given string,
288+ /// a [`ParseError`] variant will be returned.
289+ ///
290+ /// [`ParseError`]: enum.ParseError.html
284291 #[ inline]
285292 pub fn parse_with_params < I , K , V > ( input : & str , iter : I ) -> Result < Url , :: ParseError >
286293 where I : IntoIterator ,
@@ -321,6 +328,13 @@ impl Url {
321328 /// # }
322329 /// # run().unwrap();
323330 /// ```
331+ ///
332+ /// # Errors
333+ ///
334+ /// If the function can not parse an URL from the given string
335+ /// with this URL as the base URL, a [`ParseError`] variant will be returned.
336+ ///
337+ /// [`ParseError`]: enum.ParseError.html
324338 #[ inline]
325339 pub fn join ( & self , input : & str ) -> Result < Url , :: ParseError > {
326340 Url :: options ( ) . base_url ( Some ( self ) ) . parse ( input)
@@ -1455,9 +1469,6 @@ impl Url {
14551469
14561470 /// Change this URL’s host.
14571471 ///
1458- /// If this URL is cannot-be-a-base or there is an error parsing the given `host`,
1459- /// do nothing and return `Err`.
1460- ///
14611472 /// Removing the host (calling this with `None`)
14621473 /// will also remove any username, password, and port number.
14631474 ///
@@ -1531,6 +1542,13 @@ impl Url {
15311542 /// # }
15321543 /// # run().unwrap();
15331544 /// ```
1545+ ///
1546+ /// # Errors
1547+ ///
1548+ /// If this URL is cannot-be-a-base or there is an error parsing the given `host`,
1549+ /// a [`ParseError`] variant will be returned.
1550+ ///
1551+ /// [`ParseError`]: enum.ParseError.html
15341552 pub fn set_host ( & mut self , host : Option < & str > ) -> Result < ( ) , ParseError > {
15351553 if self . cannot_be_a_base ( ) {
15361554 return Err ( ParseError :: SetHostOnCannotBeABaseUrl )
0 commit comments